[TwigBundle] fixed error messages when an error occurs during template compilation

This commit is contained in:
Fabien Potencier 2011-02-04 12:54:53 +01:00
parent 2dfac2a881
commit c68b326665

View File

@ -89,7 +89,7 @@ class TwigEngine implements EngineInterface
*/
public function load($name)
{
return $this->environment->loadTemplate($this->parser->parse($name));
return $this->environment->loadTemplate($this->parser->parse($name), is_array($name) ? json_encode($name) : $name);
}
/**