]> source.dussan.org Git - nextcloud-server.git/commitdiff
check if $tables is an array
authorThomas Müller <thomas.mueller@tmit.eu>
Sat, 19 Jul 2014 18:23:38 +0000 (20:23 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Sat, 19 Jul 2014 18:23:38 +0000 (20:23 +0200)
lib/repair/innodb.php

index 4d58bf64a9ea2e8bb65bc80acfa1d8b48077fd79..6f7fcfcd4c9b61645aec0b49f12477776632b088 100644 (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"));
+                       }
                }
        }