diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-12-14 04:05:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 04:05:14 +0300 |
commit | e8ae968937c6079f734e3b37ca367c5f175f28e8 (patch) | |
tree | 148a9a47eb0208194149ace84daa34f2c9c49060 /libs/Zend | |
parent | ae5d20834cec4dffccb669661a45ffe459878452 (diff) |
Fix possible undefined constant exception when using ssl_no_verify (#18491)
Diffstat (limited to 'libs/Zend')
-rw-r--r-- | libs/Zend/Db/Adapter/Mysqli.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/Zend/Db/Adapter/Mysqli.php b/libs/Zend/Db/Adapter/Mysqli.php index e896b71a0d..2dcdd67813 100644 --- a/libs/Zend/Db/Adapter/Mysqli.php +++ b/libs/Zend/Db/Adapter/Mysqli.php @@ -317,8 +317,11 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract } elseif(is_string($option)) { // Suppress warnings here // Ignore it if it's not a valid constant + if(!defined(strtoupper($option))) { + continue; + } $option = @constant(strtoupper($option)); - if($option === null) + if ($option === null) continue; } mysqli_options($this->_connection, $option, $value); |