Returning empty array if input wasn't provided.

This commit is contained in:
Djamil Legato
2014-09-25 18:37:08 -07:00
parent 5589b48e01
commit b156c8752a

View File

@@ -231,6 +231,10 @@ class TwigExtension extends \Twig_Extension
{
$output = [];
if (!$input) {
return $output;
}
foreach ($input as $key => $row) {
$output[$key] = $row[$filter];
}