From: Alexander Ebert Date: Tue, 24 Dec 2019 16:48:06 +0000 (+0100) Subject: Incorrect usage of `array_filter` X-Git-Tag: 5.2.0~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c09f7baf4fb020a09fd9c85ca71761af89f34ef;p=GitHub%2FWoltLab%2FWCF.git Incorrect usage of `array_filter` --- diff --git a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php index 1b9323280e..8cb40824f2 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php @@ -568,14 +568,14 @@ class PackageUpdateDispatcher extends SingletonFactory { $excludeCore60 = '6.0.0 Alpha 1'; $coreExclude = null; - $versionData['excludedPackages'] = array_filter($versionData['excludedPackages'], function($excludedPackage) use (&$coreExclude) { - if ($excludedPackage['excludedPackage'] === 'com.woltlab.wcf') { - $coreExclude = $excludedPackage['excludedPackageVersion']; + $versionData['excludedPackages'] = array_filter($versionData['excludedPackages'], function($excludedPackage, $excludedVersion) use (&$coreExclude) { + if ($excludedPackage === 'com.woltlab.wcf') { + $coreExclude = $excludedVersion; return false; } return true; - }); + }, ARRAY_FILTER_USE_BOTH); if ($coreExclude === null || Package::compareVersion($coreExclude, $excludeCore60, '>')) { $versionData['excludedPackages'][] = [