Browse Source

[GENERIC] Zend_Validate_NotEmpty:

- code simplification and performance

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18267 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 years ago
parent
commit
2c633e5f09
1 changed files with 4 additions and 4 deletions
  1. 4 4
      library/Zend/Validate/NotEmpty.php

+ 4 - 4
library/Zend/Validate/NotEmpty.php

@@ -66,11 +66,11 @@ class Zend_Validate_NotEmpty extends Zend_Validate_Abstract
         ) {
         ) {
             $this->_error(self::IS_EMPTY);
             $this->_error(self::IS_EMPTY);
             return false;
             return false;
-        } elseif (is_int($value) && (0 === $value)) {
-            return true;
         } elseif (!is_string($value) && empty($value)) {
         } elseif (!is_string($value) && empty($value)) {
-            $this->_error(self::IS_EMPTY);
-            return false;
+            if (!is_int($value)) {
+                $this->_error(self::IS_EMPTY);
+                return false;
+            }
         }
         }
 
 
         return true;
         return true;