From a3f4a504fb9640be22f885877d40ac080b934530 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 16 Jan 2026 14:39:57 +0000 Subject: [PATCH 1/2] Remove dead code --- system/Database/MySQLi/Connection.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index a1c0dcce8479..1a79a4d8ef41 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -207,21 +207,6 @@ public function connect(bool $persistent = false) $socket, $clientFlags, )) { - // Prior to version 5.7.3, MySQL silently downgrades to an unencrypted connection if SSL setup fails - if (($clientFlags & MYSQLI_CLIENT_SSL) !== 0 && version_compare($this->mysqli->client_info, 'mysqlnd 5.7.3', '<=') - && empty($this->mysqli->query("SHOW STATUS LIKE 'ssl_cipher'")->fetch_object()->Value) - ) { - $this->mysqli->close(); - $message = 'MySQLi was configured for an SSL connection, but got an unencrypted connection instead!'; - log_message('error', $message); - - if ($this->DBDebug) { - throw new DatabaseException($message); - } - - return false; - } - if (! $this->mysqli->set_charset($this->charset)) { log_message('error', "Database: Unable to set the configured connection charset ('{$this->charset}')."); From b627410a85961ccb9ad252842353ddb63ec0f764 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 16 Jan 2026 15:13:01 +0000 Subject: [PATCH 2/2] Update PHPStan baselines --- utils/phpstan-baseline/empty.notAllowed.neon | 4 ++-- utils/phpstan-baseline/loader.neon | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/phpstan-baseline/empty.notAllowed.neon b/utils/phpstan-baseline/empty.notAllowed.neon index faf902d5ec10..a1a41e6588a9 100644 --- a/utils/phpstan-baseline/empty.notAllowed.neon +++ b/utils/phpstan-baseline/empty.notAllowed.neon @@ -1,4 +1,4 @@ -# total 237 errors +# total 236 errors parameters: ignoreErrors: @@ -74,7 +74,7 @@ parameters: - message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#' - count: 11 + count: 10 path: ../../system/Database/MySQLi/Connection.php - diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 4aee22070d3e..a0191547e773 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 2772 errors +# total 2771 errors includes: - argument.type.neon