Skip to content

Commit

Permalink
minor bug fixed regarding utf8 flag naming
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed May 8, 2009
1 parent 6848300 commit 3dba201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/sql.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function sqlConnect($login,$pass,$dbase,$host,$port = '3306')
$GLOBALS['dbh'] = $database->_connectionID;
//set UTF8 encoding if selected in globals.php
// log an error if flag is not set
if (!isset($GLOBALS['use_set_names_utf8'])) error_log("OpenEMR ERROR: UTF-8 encoding flag from openemr globals.php file has been lost in transit!", 0);
if ($GLOBALS['use_set_names_utf8']) mysql_query("SET NAMES 'utf8'", $GLOBALS['dbh']);
if (!isset($utf8_flag)) error_log("OpenEMR ERROR: UTF-8 encoding flag from openemr globals.php file has been lost in transit!", 0);
if ($utf8_flag) mysql_query("SET NAMES 'utf8'", $GLOBALS['dbh']);
return $GLOBALS['dbh'];
}

Expand Down

0 comments on commit 3dba201

Please sign in to comment.