From: Matthias Schmidt Date: Wed, 6 Apr 2016 16:00:50 +0000 (+0200) Subject: Fix inner loop variable having same name as other loop variable X-Git-Tag: 3.0.0_Beta_1~1961 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62e40a61cc0948b7ec2b3f4fa8c65dcbe782528c;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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;