From 1c09f7baf4fb020a09fd9c85ca71761af89f34ef Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 24 Dec 2019 17:48:06 +0100 Subject: [PATCH] Incorrect usage of `array_filter` --- .../lib/system/package/PackageUpdateDispatcher.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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'][] = [ -- 2.20.1