From: Inal DJAFAR Date: Wed, 30 Jul 2014 15:36:49 +0000 (+0200) Subject: add variables types in error message of twig_array_merge X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=ea6676d61a5cfcd34b8e6eea137a1af67e98a518;p=konrad%2Ftwig.git add variables types in error message of twig_array_merge --- diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 04a6f23..3092eb8 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -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);