From 03d762c96c930c63c9e68661b38e964171d7810f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Tue, 27 Aug 2019 13:21:26 +0200 Subject: [PATCH] Fix SQL foreignKeys check, if the returning value is a string Some compiled PHP versions do not return the correct type when you query the database. The explicit comparison then fails. --- wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php index cf1f535bee..ceb4c7fa31 100644 --- a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php @@ -249,7 +249,7 @@ class SystemCheckPage extends AbstractPage { $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($conditionBuilder->getParameters()); - $this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() === $expectedForeignKeyCount; + $this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() == $expectedForeignKeyCount; // check search engine tables $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.searchableObjectType'); -- 2.20.1