Browse Source

Prevent warning of set_charset #291

Tobias Reich 10 years ago
parent
commit
38a8e9840b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      php/modules/Database.php

+ 2 - 2
php/modules/Database.php

@@ -20,8 +20,8 @@ class Database extends Module {
 		if ($database->connect_errno) exit('Error: ' . $database->connect_error);
 
 		# Avoid sql injection on older MySQL versions by using GBK
-		if ($database->server_version<50500) $database->set_charset('GBK');
-		else $database->set_charset('utf8');
+		if ($database->server_version<50500) @$database->set_charset('GBK');
+		else @$database->set_charset('utf8');
 
 		# Set unicode
 		$database->query('SET NAMES utf8;');