Merge pull request #9741 from owncloud/fix-repair-innodb-9737-master

check if $tables is an array
This commit is contained in:
Morris Jobke 2014-07-20 21:40:53 +02:00
commit 76a5fa11f5

View file

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