removed json_encode call in Twig_Error when the filename is a string (to avoid the escaping of /)

This commit is contained in:
Fabien Potencier
2011-11-07 20:00:46 +01:00
parent 24eea1615a
commit 0cbb13d8fa
+1 -1
View File
@@ -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) {