Skip to content

Commit

Permalink
#15973 - Fix Date Validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Feb 11, 2023
1 parent 01068a5 commit 2ddc7d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phalcon/Filter/Validation/Validator/Date.zep
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 2ddc7d7

Please sign in to comment.