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

Commit

Permalink
#7093 #3758 - better exception message in case of non-iterable values…
Browse files Browse the repository at this point in the history
… given to the PartialLop helper
  • Loading branch information
Ocramius committed Jan 3, 2015
1 parent 8e91274 commit c5c3538
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/Zend/View/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 c5c3538

Please sign in to comment.