From b340d98d980ed4c36a7e18f4797f42002234ecf9 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 14 Jun 2011 08:19:32 +0200 Subject: [PATCH] added null as an alias for the none test --- CHANGELOG | 2 +- lib/Twig/Extension/Core.php | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 076988b..e45ab51 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,7 +9,7 @@ Changes: * fixed a parsing problem when a large chunk of text is enclosed in a raw tag * added support for horizontal reuse of template blocks (see docs for more information) * added whitespace control modifier to all tags (see docs for more information) - * added null as an alias for none + * added null as an alias for none (the null test is also an alias for the none test now) * made TRUE, FALSE, NONE equivalent to their lowercase counterparts * wrapped all compilation and runtime exceptions with Twig_Error_Runtime and added logic to guess the template name and line * moved display() method to Twig_Template (generated templates should now use doDisplay() instead) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 96b9d42..d627360 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -127,6 +127,7 @@ class Twig_Extension_Core extends Twig_Extension 'defined' => new Twig_Test_Function('twig_test_defined'), 'sameas' => new Twig_Test_Function('twig_test_sameas'), 'none' => new Twig_Test_Function('twig_test_none'), + 'null' => new Twig_Test_Function('twig_test_none'), 'divisibleby' => new Twig_Test_Function('twig_test_divisibleby'), 'constant' => new Twig_Test_Function('twig_test_constant'), 'empty' => new Twig_Test_Function('twig_test_empty'), -- 1.7.2.5