From 8da408339ba4221352a73c992fa77cf6824215ba Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 7 Jan 2011 17:28:00 +0100 Subject: [PATCH] fixed a notice in a unit test --- lib/Twig/Environment.php | 1 + test/Twig/Tests/TemplateTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) 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); } -- 1.7.2.5