[Pkg-owncloud-commits] [owncloud] 07/23: check if $tables is an array

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 15:21:35 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 981bd7da2a0cf17b3bcf549d4de297e3e49165d2
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Sat Jul 19 20:23:38 2014 +0200

    check if $tables is an array
---
 lib/repair/innodb.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/repair/innodb.php b/lib/repair/innodb.php
index 4d58bf6..6f7fcfc 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"));
+			}
 		}
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list