Fix inner loop variable having same name as other loop variable
authorMatthias Schmidt <gravatronics@live.com>
Wed, 6 Apr 2016 16:00:50 +0000 (18:00 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 6 Apr 2016 16:00:50 +0000 (18:00 +0200)
In both cases, this was no issues but changing it makes the code
cleaner.

wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php

index 06127966c765ccc326bc3571e36803b46e005fe9..fd2241ff21de036f43629018b71675318c8a8e31 100644 (file)
@@ -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
index 398d903048e17e7c73bdddace3e12819fef1a8e5..d8a763a9ff67f39f39d2792df4d4023d220723af 100644 (file)
@@ -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;