From b768459bec1e7970ed4639697027ce512c6e6a6c Mon Sep 17 00:00:00 2001 From: djmaze Date: Fri, 9 Apr 2021 09:58:02 +0200 Subject: [PATCH] Strict \PDO::getAvailableDrivers() --- snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php | 2 +- .../v/0.0.0/app/libraries/RainLoop/Common/PdoAbstract.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index 8941206b3..e98915c60 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -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); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Common/PdoAbstract.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Common/PdoAbstract.php index e770fdd51..a82002349 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Common/PdoAbstract.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Common/PdoAbstract.php @@ -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()) : []; }