Skip to content

Commit

Permalink
fixed occasion where counting null value
Browse files Browse the repository at this point in the history
  • Loading branch information
Shardj committed Jul 24, 2018
1 parent b137704 commit 41af1c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions library/Zend/Validate/File/FilesSize.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ public function isValid($value, $file = null)
}
}

if (count($this->_messages) > 0) {
return false;
}

return true;
return !empty($this->_messages);
}
}
6 changes: 1 addition & 5 deletions library/Zend/Validate/File/ImageSize.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 41af1c2

Please sign in to comment.