From e8ae968937c6079f734e3b37ca367c5f175f28e8 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Tue, 14 Dec 2021 02:05:14 +0100 Subject: Fix possible undefined constant exception when using ssl_no_verify (#18491) --- libs/Zend/Db/Adapter/Mysqli.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/Zend/Db/Adapter/Mysqli.php') 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); -- cgit v1.2.3