From 6170144fb10ff36db7a5ddd44adc2c92eee940ce Mon Sep 17 00:00:00 2001 From: printempw Date: Fri, 26 Aug 2016 17:36:57 +0800 Subject: [PATCH] fix using deprecated mysql_escape_string() --- app/Core/Database/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Core/Database/Database.php b/app/Core/Database/Database.php index d51cb7fb..c51c2ab9 100644 --- a/app/Core/Database/Database.php +++ b/app/Core/Database/Database.php @@ -60,11 +60,11 @@ class Database public function table($table_name, $no_prefix = false) { - if (mysql_escape_string($table_name) == $table_name) { + if ($this->connection->real_escape_string($table_name) == $table_name) { $this->table_name = $no_prefix ? $table_name : $this->config['prefix'].$table_name; return $this; } else { - throw new E('Table name contains invalid characters', 1); + throw new \InvalidArgumentException('Table name contains invalid characters', 1); } }