From: Tim Düsterhus Date: Thu, 26 Nov 2020 13:36:36 +0000 (+0100) Subject: Fix package check in update_com.woltlab.wcf_5.4_removeFiles.php X-Git-Tag: 5.4.0_Alpha_1~580 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9fcfbfebe0b5be38d5691222562293a006c40904;p=GitHub%2FWoltLab%2FWCF.git Fix package check in update_com.woltlab.wcf_5.4_removeFiles.php `fetchSingleColumn()` returns false for non-existing rows. --- diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_removeFiles.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_removeFiles.php index c1087e8b5e..fa9acc1df4 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_removeFiles.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.4_removeFiles.php @@ -22,7 +22,7 @@ $packageID = $this->installation->getPackageID(); foreach ($files as $file) { $searchStatement->execute([$file]); $filePackageID = $searchStatement->fetchSingleColumn(); - if ($filePackageID !== null && $filePackageID != $packageID) { + if ($filePackageID !== false && $filePackageID != $packageID) { throw new \UnexpectedValueException("File '{$file}' does not belong to package '{$this->installation->getPackage()->package}' but to package '" . PackageCache::getInstance()->getPackage($filePackageID)->package . "'."); }