فهرست منبع

Merge pull request #192 from biozshock/master

After mesage "Installing dependencies" composer dies silently.
Jordi Boggiano 13 سال پیش
والد
کامیت
3d52798c0f
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 1
      src/Composer/DependencyResolver/RuleSet.php
  2. 2 1
      src/Composer/DependencyResolver/RuleSetIterator.php

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

@@ -55,7 +55,7 @@ class RuleSet implements \IteratorAggregate, \Countable
     public function add(Rule $rule, $type)
     {
         if (!isset(self::$types[$type])) {
-            throw OutOfBoundsException('Unknown rule type: ' . $type);
+            throw new \OutOfBoundsException('Unknown rule type: ' . $type);
         }
 
         if (!isset($this->rules[$type])) {

+ 2 - 1
src/Composer/DependencyResolver/RuleSetIterator.php

@@ -88,6 +88,7 @@ class RuleSetIterator implements \Iterator
 
     public function valid()
     {
-        return isset($this->rules[$this->currentType][$this->currentOffset]);
+        return isset($this->rules[$this->currentType])
+               && isset($this->rules[$this->currentType][$this->currentOffset]);
     }
 }