Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions system/Database/MySQLi/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}').");

Expand Down
4 changes: 2 additions & 2 deletions utils/phpstan-baseline/empty.notAllowed.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 237 errors
# total 236 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -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

-
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 2772 errors
# total 2771 errors

includes:
- argument.type.neon
Expand Down
Loading