mirror of
https://github.com/projectsend/projectsend.git
synced 2026-10-05 12:54:33 +00:00
Use Pdo\Mysql::ATTR_SSL_CA, which PHP 8.5 no longer warns about
PHP 8.5 deprecated PDO::MYSQL_ATTR_SSL_CA, so loading config/database.php printed two "Deprecated" warnings, one for each of the MySQL and MariaDB connections. On a server that displays warnings, they appeared on every page. Pdo\Mysql::ATTR_SSL_CA exists since PHP 8.4, which is our minimum, so no version check is needed. Checked by loading the real config file under PHP 8.5 with pdo_mysql: the old file prints both warnings, and the new one prints none and sets the same option. Reported by @jiits (#1796)
This commit is contained in:
+2
-2
@@ -58,7 +58,7 @@ return [
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
Pdo\Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
@@ -78,7 +78,7 @@ return [
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
Pdo\Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user