Skip to content

Conversation

1blankz7
Copy link
Member

No description provided.

@1blankz7 1blankz7 merged commit a62e6c6 into master Nov 16, 2021
@@ -38,6 +38,6 @@ private function isValidDatetime(string $value): bool
$date = DateTime::createFromFormat($this->datetimeFormat, $value, new DateTimeZone($this->datetimeZone));
$errors = DateTime::getLastErrors();

return $date && $errors['warning_count'] === 0 && $errors['error_count'] === 0;
return $date && !$errors;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the library: https://3v4l.org/hFvIJ
I do not know why php.net tells us that the function would return false, but it does not. Neither in 7.4, nor 8.0, nor 8.1 (see the 3v4l)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants