projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
620b29a
)
fixed a crash under certain versions of PHP when an object with a __toString() method...
author
Fabien Potencier
<fabien.potencier@gmail.com>
Fri, 25 Nov 2011 18:36:25 +0000 (19:36 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Fri, 25 Nov 2011 18:36:25 +0000 (19:36 +0100)
lib/Twig/Extension/Core.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Core.php
b/lib/Twig/Extension/Core.php
index
40cf292
..
f98ce5a
100644
(file)
--- a/
lib/Twig/Extension/Core.php
+++ b/
lib/Twig/Extension/Core.php
@@
-498,6
+498,8
@@
function twig_escape_filter(Twig_Environment $env, $string, $type = 'html', $cha
$charset = $env->getCharset();
}
+ $string = (string) $string;
+
switch ($type) {
case 'js':
// escape all non-alphanumeric characters