Adjust variable name
authorJoshua Rüsweg <ruesweg@woltlab.com>
Thu, 1 Aug 2019 09:37:46 +0000 (11:37 +0200)
committerJoshua Rüsweg <ruesweg@woltlab.com>
Thu, 1 Aug 2019 09:37:46 +0000 (11:37 +0200)
See #2977

wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php

index c3ecda56c443604b79146791e1b4590d470ec99c..2f8570b0e82c97892d45af8227d612c4af447a61 100644 (file)
@@ -220,7 +220,7 @@ class SystemCheckPage extends AbstractPage {
                }
                
                // validate foreign keys
-               $keyCount = 0;
+               $expectedForeignKeyCount = 0;
                $conditionBuilder = new PreparedStatementConditionBuilder(true, 'OR');
                foreach ($this->foreignKeys as $table => $keys) {
                        foreach ($keys as $column => $reference) {
@@ -233,7 +233,7 @@ class SystemCheckPage extends AbstractPage {
                                
                                $conditionBuilder->add('('. $innerConditionBuilder .')', $innerConditionBuilder->getParameters());
                                
-                               $keyCount++;
+                               $expectedForeignKeyCount++;
                        }
                }
                
@@ -243,7 +243,7 @@ class SystemCheckPage extends AbstractPage {
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                
-               $this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() === $keyCount;
+               $this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() === $expectedForeignKeyCount;
                
                if ($this->results['mysql']['result'] && $this->results['mysql']['innodb'] && $this->results['mysql']['foreignKeys']) {
                        $this->results['status']['mysql'] = true;