fix using deprecated mysql_escape_string()
This commit is contained in:
parent
56bfcd0b67
commit
6170144fb1
|
|
@ -60,11 +60,11 @@ class Database
|
||||||
|
|
||||||
public function table($table_name, $no_prefix = false)
|
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;
|
$this->table_name = $no_prefix ? $table_name : $this->config['prefix'].$table_name;
|
||||||
return $this;
|
return $this;
|
||||||
} else {
|
} else {
|
||||||
throw new E('Table name contains invalid characters', 1);
|
throw new \InvalidArgumentException('Table name contains invalid characters', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user