mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-29 19:20:23 +02:00
[ticket/17232] Improve SQL error messages handling
PHP 7 changes how most errors are reported by PHP. Instead of reporting errors through the traditional error reporting mechanism used by PHP 5, most errors are now reported by throwing Error exceptions. Use it to display meaningful SQL error messages instead of PHP fatal errors for SQL errors. PHPBB3-17232
This commit is contained in:
@@ -33,6 +33,10 @@ class factory
|
||||
{
|
||||
return new \phpbb\db\tools\postgres($db_driver, $return_statements);
|
||||
}
|
||||
else if ($db_driver instanceof \phpbb\db\driver\sqlite3)
|
||||
{
|
||||
return new \phpbb\db\tools\sqlite3($db_driver, $return_statements);
|
||||
}
|
||||
else if ($db_driver instanceof \phpbb\db\driver\driver_interface)
|
||||
{
|
||||
return new \phpbb\db\tools\tools($db_driver, $return_statements);
|
||||
|
Reference in New Issue
Block a user