From 2f5e0cacd422e25885ab5f860272bb9129c18ebc Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Wed, 27 Apr 2011 08:50:08 -0700 Subject: [PATCH] Simplify fix. --- lib/Twig/Extension/Core.php | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 5429c07..ad7494f 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -495,9 +495,5 @@ function twig_test_defined($name, $context) function twig_test_empty($value) { - if (null === $value || false === $value) { - return true; - } - - return empty($value) && '0' != $value; + return false === $value || (empty($value) && '0' != $value); } -- 1.7.2.5