Yanick Witschi %!s(int64=8) %!d(string=hai) anos
pai
achega
a9e88a27b3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Composer/DependencyResolver/RuleSet.php

+ 2 - 2
src/Composer/DependencyResolver/RuleSet.php

@@ -58,12 +58,12 @@ class RuleSet implements \IteratorAggregate, \Countable
             throw new \OutOfBoundsException('Unknown rule type: ' . $type);
         }
 
+        $hash = $rule->getHash();
+
         if (!isset($this->rules[$type])) {
             $this->rules[$type] = array();
         }
 
-        $hash = $rule->getHash();
-
         // Do not add if rule already exists
         if (isset($this->rulesByHash[$hash])) {
             $potentialDuplicates = $this->rulesByHash[$hash];