mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX Escape wildcard characters when matching database name in databaseExists
This commit is contained in:
parent
370bb6bbaa
commit
f918dcd36a
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user