⚠️ This issue respects the following points: ⚠️
Bug description
MySQL dbdriveroptions (such as [\Pdo\Mysql::ATTR_SSL_CA => '/path/to/ca.crt'] are not passed correctly to a PDO driver because ConnectionFactory uses array_merge which does not retain numeric keys. In the end, the PDO driver receives [0 => '/path/to/ca.crt'].
Steps to reproduce
- Configure explicit
dbdriveroptions (such as 'dbdriveroptions' => [\Pdo\Mysql::ATTR_SSL_CA => '/path/to/ca.crt']) or implicit ones (such as 'dbtype' => 'mysql' with 'dbsslca' => '/path/to/ca.crt' where dbsslca is implicitly converted to dbdriveroptions).
- Intercept the PDO driver options or use driver options which are mandatory for a MySQL connection.
Expected behavior
dbdriveroptions are passed correctly do the PDO driver.
Nextcloud Server version
35
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Bug description
MySQL dbdriveroptions (such as
[\Pdo\Mysql::ATTR_SSL_CA => '/path/to/ca.crt']are not passed correctly to a PDO driver because ConnectionFactory usesarray_mergewhich does not retain numeric keys. In the end, the PDO driver receives[0 => '/path/to/ca.crt'].Steps to reproduce
dbdriveroptions(such as'dbdriveroptions' => [\Pdo\Mysql::ATTR_SSL_CA => '/path/to/ca.crt']) or implicit ones (such as'dbtype' => 'mysql'with'dbsslca' => '/path/to/ca.crt'wheredbsslcais implicitly converted todbdriveroptions).Expected behavior
dbdriveroptionsare passed correctly do the PDO driver.Nextcloud Server version
35
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response