?
avatar ReLater
ReLater
7 Jan 2018

Because I'm not sure if that's an expected behavior I'm reporting it here.

with Joomla 3.8.3 it is possible to make a database serverType check like this:

$db = JFactory::getDbo();
if ($db->serverType != 'mysql')
{
 echo 'nag nag nag';
}

but not with current staging Joomla 4. $db->serverType is an empty property there.
(You can use $db->getServerType() != 'mysql' instead.)

System information (as much as possible)

XAMPP 7.1.8
win 10 / 64
Database Type (Joomla): MySQLi

avatar ReLater ReLater - open - 7 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jan 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Jan 2018
avatar ReLater ReLater - change - 7 Jan 2018
The description was changed
avatar ReLater ReLater - edited - 7 Jan 2018
avatar ReLater ReLater - change - 7 Jan 2018
The description was changed
avatar ReLater ReLater - edited - 7 Jan 2018
avatar ReLater ReLater - change - 7 Jan 2018
The description was changed
avatar ReLater ReLater - edited - 7 Jan 2018
avatar ReLater ReLater - change - 7 Jan 2018
The description was changed
avatar ReLater ReLater - edited - 7 Jan 2018
avatar ReLater ReLater - change - 7 Jan 2018
The description was changed
avatar ReLater ReLater - edited - 7 Jan 2018
avatar mbabker mbabker - change - 7 Jan 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-01-07 03:07:57
Closed_By mbabker
avatar mbabker mbabker - close - 7 Jan 2018
avatar mbabker
mbabker - comment - 7 Jan 2018

You should use the getServerType method to retrieve this as the getter will ensure the property value is set.

In 3.x the drivers may be setting this property manually but in 4.0 the code is all relying on this getter to do it.

Add a Comment

Login with GitHub to post a comment