FIX Handle invalid table names

This commit is contained in:
Steve Boyd 2021-06-02 17:38:25 +12:00
parent 2228bf3be7
commit ff75f6edc1

View File

@ -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);
} }
} }