From 440b5caad7f411b5cd40fd9e9857515199fd3b44 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Sun, 3 Apr 2016 20:54:26 +0100 Subject: [PATCH] Fix conditional check in MySQL setup --- lib/private/setup/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/setup/mysql.php b/lib/private/setup/mysql.php index ba1b2ca854..18b6dab4ff 100644 --- a/lib/private/setup/mysql.php +++ b/lib/private/setup/mysql.php @@ -43,7 +43,7 @@ class MySQL extends AbstractDatabase { $query='select count(*) from information_schema.tables where table_schema=? AND table_name = ?'; $result = $connection->executeQuery($query, [$this->dbName, $this->tablePrefix.'users']); $row = $result->fetch(); - if(!$result or $row[0]==0) { + if (!$row or $row['count(*)'] === '0') { \OC_DB::createDbFromStructure($this->dbDefinitionFile); } }