projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
4134169
)
add variables types in error message of twig_array_merge
author
Inal DJAFAR
<inal.djafar@sensiolabs.com>
Wed, 30 Jul 2014 15:36:49 +0000 (17:36 +0200)
committer
Inal DJAFAR
<inal.djafar@sensiolabs.com>
Wed, 30 Jul 2014 15:44:54 +0000 (17:44 +0200)
lib/Twig/Extension/Core.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Core.php
b/lib/Twig/Extension/Core.php
index
04a6f23
..
3092eb8
100644
(file)
--- 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);