From: Joseph Bielawski Date: Wed, 27 Apr 2011 15:50:08 +0000 (-0700) Subject: Simplify fix. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=2f5e0cacd422e25885ab5f860272bb9129c18ebc;p=konrad%2Ftwig.git Simplify fix. --- 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); }