From 41af1c27b57c7d152dcd524110aa38a1c0650d66 Mon Sep 17 00:00:00 2001 From: George Appleton Date: Tue, 24 Jul 2018 09:14:34 +0100 Subject: [PATCH] fixed occasion where counting null value --- library/Zend/Validate/File/FilesSize.php | 6 +----- library/Zend/Validate/File/ImageSize.php | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/library/Zend/Validate/File/FilesSize.php b/library/Zend/Validate/File/FilesSize.php index b648133416..0c80079b78 100644 --- a/library/Zend/Validate/File/FilesSize.php +++ b/library/Zend/Validate/File/FilesSize.php @@ -155,10 +155,6 @@ public function isValid($value, $file = null) } } - if (count($this->_messages) > 0) { - return false; - } - - return true; + return !empty($this->_messages); } } diff --git a/library/Zend/Validate/File/ImageSize.php b/library/Zend/Validate/File/ImageSize.php index 871fef84ff..b9e68dff5d 100644 --- a/library/Zend/Validate/File/ImageSize.php +++ b/library/Zend/Validate/File/ImageSize.php @@ -338,11 +338,7 @@ public function isValid($value, $file = null) $this->_throw($file, self::HEIGHT_TOO_BIG); } - if (count($this->_messages) > 0) { - return false; - } - - return true; + return !empty($this->_messages); } /**