mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +00:00
add variables types in error message of twig_array_merge
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user