From 38a8e9840bc66894c09e919fa4a2addd7e896546 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Thu, 22 Jan 2015 21:24:20 +0100 Subject: [PATCH] Prevent warning of set_charset #291 --- php/modules/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/modules/Database.php b/php/modules/Database.php index c7ae0b1..9a8b466 100755 --- a/php/modules/Database.php +++ b/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;');