Merge pull request #9962 from creative-commoners/pulls/3.7/test-is-array

FIX Handle invalid table names
This commit is contained in:
Daniel Hensby 2021-06-02 08:58:13 +01:00 committed by GitHub
commit d68a50aeaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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