From: Fabien Potencier Date: Mon, 2 Jan 2012 13:20:16 +0000 (+0100) Subject: simplified code X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=64e3ce6a11a1eb860d14b8e7039adc6411c1f721;p=konrad%2Ftwig.git simplified code --- diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index a042c37..8ca4c8e 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -489,11 +489,7 @@ function twig_array_merge($arr1, $arr2) function twig_join_filter($value, $glue = '') { if ($value instanceof Traversable) { - $values = array(); - foreach ($value as $v) { - $values[] = $v; - } - $value = $values; + $value = iterator_to_array($value); } return implode($glue, (array) $value);