Explorar o código

[TwigBundle] Default $globals to null as in FrameworkBundle/PhpEngine

Igor Wiedler %!s(int64=14) %!d(string=hai) anos
pai
achega
aa8428632b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Symfony/Bundle/TwigBundle/TwigEngine.php

+ 1 - 1
src/Symfony/Bundle/TwigBundle/TwigEngine.php

@@ -34,7 +34,7 @@ class TwigEngine implements EngineInterface
      * @param TemplateNameParserInterface $parser      A TemplateNameParserInterface instance
      * @param GlobalVariables|null        $globals     A GlobalVariables instance or null
      */
-    public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, GlobalVariables $globals)
+    public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, GlobalVariables $globals = null)
     {
         $this->environment = $environment;
         $this->parser = $parser;