From d858807e6e3a5731b363363f98bbf357831bcdc0 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sat, 3 Jan 2015 16:30:20 +0100 Subject: [PATCH] zendframework/zf2#7093 zendframework/zf2#3758 - better exception message in case of non-iterable values given to the PartialLop helper --- src/Helper/PartialLoop.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Helper/PartialLoop.php b/src/Helper/PartialLoop.php index 8bb79221..96a9d380 100644 --- a/src/Helper/PartialLoop.php +++ b/src/Helper/PartialLoop.php @@ -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) + )); } }