summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-06 14:28:57 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-06 14:28:57 +0200
commitfa7f1874dd696a5e964be082231a87264d40674f (patch)
treedae12c7fbf933dc1fd69f27152b8f518377bebf5
parent277c9f4a03be77c03a7b051cf92bfc0e14c3e398 (diff)
parentcff3122a37b8b75737fada19ac8c15b4705fe2fd (diff)
downloadnextcloud-server-fa7f1874dd696a5e964be082231a87264d40674f.tar.gz
nextcloud-server-fa7f1874dd696a5e964be082231a87264d40674f.zip
Merge pull request #23805 from owncloud/backport-of-#23760
[stable9] Fix conditional check in MySQL setup
-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 de2466676c1..86b60d417af 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);
}
}