Skip to content

Commit

Permalink
debug PDO::MYSQL_ATTR_INIT_COMMAND
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey.girard committed Mar 24, 2015
1 parent fc2b6f3 commit df4ca29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class/class.pdo.db.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function __construct($db_type = '', $connexionString='', $DB_USER='', $DB_PASS='

$charset = ini_get('default_charset');

if(empty($DB_OPTIONS[PDO::MYSQL_ATTR_INIT_COMMAND]) && ($charset === 'iso-8859-1' || empty($charset))){
$DB_OPTIONS[PDO::MYSQL_ATTR_INIT_COMMAND]= 'SET NAMES \'UTF8\'';
if(empty($DB_OPTIONS[1002]) && ($charset === 'iso-8859-1' || empty($charset))){
$DB_OPTIONS[1002]= 'SET NAMES \'UTF8\'';
}

if(empty($connexionString)) {
Expand Down

0 comments on commit df4ca29

Please sign in to comment.