From 62e40a61cc0948b7ec2b3f4fa8c65dcbe782528c Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 6 Apr 2016 18:00:50 +0200 Subject: [PATCH] Fix inner loop variable having same name as other loop variable In both cases, this was no issues but changing it makes the code cleaner. --- wcfsetup/install/files/lib/system/WCFSetup.class.php | 4 ++-- .../system/package/PackageInstallationNodeBuilder.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 06127966c7..fd2241ff21 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -1203,8 +1203,8 @@ class WCFSetup extends WCF { // remove package files @unlink(TMP_DIR.'install/packages/'.$wcfPackageFile); - foreach ($otherPackages as $packageFile) { - @unlink(TMP_DIR.'install/packages/'.$packageFile); + foreach ($otherPackages as $otherPackageFile) { + @unlink(TMP_DIR.'install/packages/'.$otherPackageFile); } // throw exception again diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php index 398d903048..d8a763a9ff 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php @@ -660,8 +660,8 @@ class PackageInstallationNodeBuilder { // check if all requirements are met $isInstallable = true; - foreach ($archive->getOpenRequirements() as $packageName => $package) { - if (!isset($package['file'])) { + foreach ($archive->getOpenRequirements() as $packageName => $requiredPackage) { + if (!isset($requiredPackage['file'])) { // requirement is neither installed nor shipped, check if it is about to be installed if (!isset(self::$pendingPackages[$packageName])) { $isInstallable = false; -- 2.20.1