summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-07-19 20:23:38 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-07-19 20:24:34 +0200
commit981bd7da2a0cf17b3bcf549d4de297e3e49165d2 (patch)
tree15e303dc656d279d41d86babbccb83dfe20f04ad /lib
parentbab5de8e8f3e055e6e4f03b5826d1c013b4c2e20 (diff)
downloadnextcloud-server-981bd7da2a0cf17b3bcf549d4de297e3e49165d2.tar.gz
nextcloud-server-981bd7da2a0cf17b3bcf549d4de297e3e49165d2.zip
check if $tables is an array
Diffstat (limited to 'lib')
-rw-r--r--lib/repair/innodb.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/repair/innodb.php b/lib/repair/innodb.php
index 4d58bf64a9e..6f7fcfcd4c9 100644
--- a/lib/repair/innodb.php
+++ b/lib/repair/innodb.php
@@ -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"));
+ }
}
}