mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-21 14:08:48 -04:00
Avoid privilege for setting the for MariaDB/MySQL, fixes #919
This commit is contained in:
parent
a15b395eaf
commit
0e2ec27033
2 changed files with 3 additions and 1 deletions
|
@ -100,7 +100,7 @@ class Database extends AbstractData
|
|||
// MySQL uses backticks to quote identifiers by default,
|
||||
// tell it to expect ANSI SQL double quotes
|
||||
if (self::$_type === 'mysql' && defined('PDO::MYSQL_ATTR_INIT_COMMAND')) {
|
||||
$options['opt'][PDO::MYSQL_ATTR_INIT_COMMAND] = "SET sql_mode='ANSI_QUOTES'";
|
||||
$options['opt'][PDO::MYSQL_ATTR_INIT_COMMAND] = "SET SESSION sql_mode='ANSI_QUOTES'";
|
||||
}
|
||||
$tableQuery = self::_getTableQuery(self::$_type);
|
||||
self::$_db = new PDO(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue