check if $tables is an array

This commit is contained in:
Thomas Müller 2014-07-19 20:23:38 +02:00
parent d09ec36751
commit f0c0bd5251
1 changed files with 5 additions and 3 deletions

View File

@ -28,11 +28,13 @@ class InnoDB extends BasicEmitter implements \OC\RepairStep {
}
$tables = $this->getAllMyIsamTables($connection);
if (is_array($tables)) {
foreach ($tables as $table) {
$connection->exec("ALTER TABLE $table ENGINE=InnoDB;");
$this->emit('\OC\Repair', 'info', array("Fixed $table"));
}
}
}
/**
* @param \Doctrine\DBAL\Connection $connection