From e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Oct 2019 22:12:46 +0200 Subject: [ticket/16051] Automatically convert mysql driver to mysqli PHPBB3-16051 --- phpBB/phpbb/config_php_file.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phpBB/phpbb/config_php_file.php') 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"); } } -- cgit v1.2.1