From de066de1987b0bab5c4da3181d2983439f799401 Mon Sep 17 00:00:00 2001 From: "Artem Lopata (bumz)" Date: Sun, 8 Jan 2012 23:24:58 +0200 Subject: [PATCH] Fix for composer. When running update/install command it's just do nothing, except writing "Installing dependencies" --- src/Composer/DependencyResolver/RuleSet.php | 2 +- src/Composer/DependencyResolver/RuleSetIterator.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Composer/DependencyResolver/RuleSet.php b/src/Composer/DependencyResolver/RuleSet.php index f7dd1c446..6d79a9678 100644 --- a/src/Composer/DependencyResolver/RuleSet.php +++ b/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])) { diff --git a/src/Composer/DependencyResolver/RuleSetIterator.php b/src/Composer/DependencyResolver/RuleSetIterator.php index 46abb8ac7..63563ae51 100644 --- a/src/Composer/DependencyResolver/RuleSetIterator.php +++ b/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]); } }