From: Joshua Rüsweg Date: Tue, 27 Aug 2019 11:21:26 +0000 (+0200) Subject: Fix SQL foreignKeys check, if the returning value is a string X-Git-Tag: 5.2.0_Beta_2~87 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03d762c96c930c63c9e68661b38e964171d7810f;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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');