mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9962 from creative-commoners/pulls/3.7/test-is-array
FIX Handle invalid table names
This commit is contained in:
commit
d68a50aeaa
@ -317,7 +317,8 @@ abstract class DBSchemaManager {
|
|||||||
if (preg_match('/ENGINE=([^\s]*)/', $options[$dbID], $alteredEngineMatches)) {
|
if (preg_match('/ENGINE=([^\s]*)/', $options[$dbID], $alteredEngineMatches)) {
|
||||||
$alteredEngine = $alteredEngineMatches[1];
|
$alteredEngine = $alteredEngineMatches[1];
|
||||||
$tableStatus = $this->query(sprintf('SHOW TABLE STATUS LIKE \'%s\'', $table))->first();
|
$tableStatus = $this->query(sprintf('SHOW TABLE STATUS LIKE \'%s\'', $table))->first();
|
||||||
$tableOptionsChanged = ($tableStatus['Engine'] != $alteredEngine);
|
$engine = isset($tableStatus['Engine']) ? $tableStatus['Engine'] : null;
|
||||||
|
$tableOptionsChanged = ($engine != $alteredEngine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user