set sql_mode to disable STRICT_MODE usage for froxlor, thx to albech for the hint

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2017-11-08 07:49:40 +01:00
parent dd3e5e9c6b
commit 1e03946df7
3 changed files with 5 additions and 5 deletions

View File

@@ -262,7 +262,7 @@ class Database {
// build up connection string
$driver = 'mysql';
$dsn = $driver.":";
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'set names utf8');
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET names utf8,sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"');
$attributes = array('ATTR_ERRMODE' => 'ERRMODE_EXCEPTION');
$dbconf["dsn"] = array(