Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…etter exception message in case of non-iterable values given to the PartialLop helper
  • Loading branch information
Ocramius committed Jan 3, 2015
1 parent 68938d0 commit d858807
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Helper/PartialLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ private function extractViewVariables($values)
return $values->toArray();
}

throw new Exception\InvalidArgumentException('PartialLoop helper requires iterable data');
throw new Exception\InvalidArgumentException(sprintf(
'PartialLoop helper requires iterable data, %s given',
is_object($values) ? get_class($values) : gettype($values)
));
}
}

0 comments on commit d858807

Please sign in to comment.