summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Hansson <daniel@techandme.se>2016-04-05 16:06:17 +0200
committerDaniel Hansson <daniel@techandme.se>2016-04-05 16:06:17 +0200
commitf07323d6c02c46bef64e935c93cf5e04d19caea3 (patch)
tree4231a43480db51b464b0ea2a4eeee58bc8232ff4 /lib
parentcb9d0b9c7ce30032b2a01a065c12ceee5be9738d (diff)
downloadnextcloud-server-f07323d6c02c46bef64e935c93cf5e04d19caea3.tar.gz
nextcloud-server-f07323d6c02c46bef64e935c93cf5e04d19caea3.zip
[stable9] Fix conditional check in MySQL setup
Backport of "Fix conditional check in MySQL setup #23760"
Diffstat (limited to 'lib')
-rw-r--r--lib/private/setup/mysql.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/setup/mysql.php b/lib/private/setup/mysql.php
index e8b88eb3489..9e625fb20e4 100644
--- a/lib/private/setup/mysql.php
+++ b/lib/private/setup/mysql.php
@@ -42,7 +42,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);
}
}