Skip to content

Commit

Permalink
add variables types in error message of twig_array_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
inalgnu committed Jul 30, 2014
1 parent 4134169 commit ea6676d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Twig/Extension/Core.php
Expand Up @@ -672,7 +672,7 @@ function _twig_markup2string(&$value)
function twig_array_merge($arr1, $arr2)
{
if (!is_array($arr1) || !is_array($arr2)) {
throw new Twig_Error_Runtime('The merge filter only works with arrays or hashes.');
throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or hashes; %s and %s given.', gettype($arr1), gettype($arr2)));
}

return array_merge($arr1, $arr2);
Expand Down

0 comments on commit ea6676d

Please sign in to comment.