From: Fabien Potencier Date: Mon, 7 Nov 2011 19:00:46 +0000 (+0100) Subject: removed json_encode call in Twig_Error when the filename is a string (to avoid the... X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=0cbb13d8fab0c30e418c4aa3327e4eec4a5ffe6d;p=web%2Fkonrad%2Ftwig.git removed json_encode call in Twig_Error when the filename is a string (to avoid the escaping of /) --- diff --git a/lib/Twig/Error.php b/lib/Twig/Error.php index ed0836c..8c1c54b 100644 --- a/lib/Twig/Error.php +++ b/lib/Twig/Error.php @@ -132,7 +132,7 @@ class Twig_Error extends Exception } if (null !== $this->filename) { - $this->message .= sprintf(' in %s', json_encode($this->filename)); + $this->message .= sprintf(' in %s', is_string($this->filename) ? '"'.$this->filename.'"' : json_encode($this->filename)); } if ($this->lineno >= 0) {