Skip to content
Snippets Groups Projects
Commit f0c0bd52 authored by Thomas Müller's avatar Thomas Müller
Browse files

check if $tables is an array

parent d09ec367
No related branches found
No related tags found
No related merge requests found
......@@ -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"));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment