Strict \PDO::getAvailableDrivers()

This commit is contained in:
djmaze 2021-04-09 09:58:02 +02:00
parent 49e5a88daa
commit b768459bec
2 changed files with 3 additions and 3 deletions

View file

@ -1194,7 +1194,7 @@ class Actions
$aResult['VerifySslCertificate'] = (bool)$oConfig->Get('ssl', 'verify_certificate', false);
$aResult['AllowSelfSigned'] = (bool)$oConfig->Get('ssl', 'allow_self_signed', true);
$aResult['supportedPdoDrivers'] = \class_exists('PDO') ? \RainLoop\Common\PdoAbstract::getAvailableDrivers() : [];
$aResult['supportedPdoDrivers'] = \RainLoop\Common\PdoAbstract::getAvailableDrivers();
$aResult['ContactsEnable'] = (bool)$oConfig->Get('contacts', 'enable', false);
$aResult['ContactsSync'] = (bool)$oConfig->Get('contacts', 'allow_sync', false);

View file

@ -52,8 +52,8 @@ abstract class PdoAbstract
public static function getAvailableDrivers() : array
{
return \class_exists('PDO')
? array_intersect(['mysql', 'sqlite', 'pgsql'], \PDO::getAvailableDrivers())
return \class_exists('PDO', false)
? \array_intersect(['mysql', 'sqlite', 'pgsql'], \PDO::getAvailableDrivers())
: [];
}