diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-10-06 22:12:46 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-10-06 22:12:46 +0200 |
commit | e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac (patch) | |
tree | 4d7fd880554b5ebadbc22af44e9af150c5815856 | |
parent | bd02c5bd085e957aa4341e7fc2df2199081ab069 (diff) | |
download | forums-e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac.tar forums-e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac.tar.gz forums-e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac.tar.bz2 forums-e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac.tar.xz forums-e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac.zip |
[ticket/16051] Automatically convert mysql driver to mysqli
PHPBB3-16051
-rw-r--r-- | phpBB/phpbb/config_php_file.php | 6 | ||||
-rw-r--r-- | tests/di/fixtures/config.php | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/phpbb/config_php_file.php b/phpBB/phpbb/config_php_file.php index 7445e7df22..e3f7357720 100644 --- a/phpBB/phpbb/config_php_file.php +++ b/phpBB/phpbb/config_php_file.php @@ -155,6 +155,12 @@ class config_php_file return $dbms; } + // Force use of mysqli when specifying mysql + if (preg_match('/(phpbb\\\db\\\driver\\\)?mysql$/i', $dbms)) + { + return 'phpbb\db\driver\mysqli'; + } + throw new \RuntimeException("You have specified an invalid dbms driver: $dbms"); } } diff --git a/tests/di/fixtures/config.php b/tests/di/fixtures/config.php index d6b8a567c7..1e9207d924 100644 --- a/tests/di/fixtures/config.php +++ b/tests/di/fixtures/config.php @@ -1,7 +1,7 @@ <?php // phpBB 3.1.x auto-generated configuration file // Do not change anything in this file! -$dbms = 'mysqli'; +$dbms = 'mysql'; $dbhost = '127.0.0.1'; $dbport = ''; $dbname = 'phpbb'; |