From: Fabien Potencier Date: Fri, 7 Jan 2011 16:28:00 +0000 (+0100) Subject: fixed a notice in a unit test X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=8da408339ba4221352a73c992fa77cf6824215ba;p=web%2Fkonrad%2Ftwig.git fixed a notice in a unit test --- diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 52132b4..46a6df1 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -713,6 +713,7 @@ class Twig_Environment if (null === $this->functions) { $this->loadFunctions(); } + $this->functions[$name] = $function; } diff --git a/test/Twig/Tests/TemplateTest.php b/test/Twig/Tests/TemplateTest.php index 6492e88..77d5112 100644 --- a/test/Twig/Tests/TemplateTest.php +++ b/test/Twig/Tests/TemplateTest.php @@ -95,7 +95,7 @@ class Twig_TemplateTest extends Twig_Template { } - public function getAttribute($object, $item, array $arguments = array(), $type = Twig_Node_Expression_GetAttr::TYPE_ANY, $noStrictCheck = false) + public function getAttribute($object, $item, array $arguments = array(), $type = Twig_Node_Expression_GetAttr::TYPE_ANY, $noStrictCheck = false, $lineno = -1) { return parent::getAttribute($object, $item, $arguments, $type); }