From 9fcfbfebe0b5be38d5691222562293a006c40904 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 26 Nov 2020 14:36:36 +0100 Subject: [PATCH] Fix package check in update_com.woltlab.wcf_5.4_removeFiles.php `fetchSingleColumn()` returns false for non-existing rows. --- .../files/acp/update_com.woltlab.wcf_5.4_removeFiles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 . "'."); } -- 2.20.1