diff --git a/phalcon/Filter/Validation/Validator/Date.zep b/phalcon/Filter/Validation/Validator/Date.zep index 2d29c134b2b..e5f151c69f7 100644 --- a/phalcon/Filter/Validation/Validator/Date.zep +++ b/phalcon/Filter/Validation/Validator/Date.zep @@ -116,6 +116,6 @@ class Date extends AbstractValidator let date = DateTime::createFromFormat(format, value); let errors = DateTime::getLastErrors(); - return errors["warning_count"] == 0 && errors["error_count"] == 0; + return errors === false || (errors["warning_count"] == 0 && errors["error_count"] == 0); } }