FIX Escape wildcard characters when matching database name in databaseExists

This commit is contained in:
Guy Marriott 2019-01-30 09:31:13 +13:00
parent 370bb6bbaa
commit f918dcd36a
No known key found for this signature in database
GPG Key ID: A80F9ACCB86D3DA7

View File

@ -207,7 +207,7 @@ class MySQLSchemaManager extends DBSchemaManager
public function databaseExists($name)
{
// MySQLi doesn't like parameterised queries for some queries
$sqlName = $this->database->quoteString($name);
$sqlName = addcslashes($this->database->quoteString($name), '%_');
return !!($this->query("SHOW DATABASES LIKE $sqlName")->value());
}