Skip to content

Commit 4c56f5b

Browse files
committed
Update Validator::datetime method
1 parent dc05717 commit 4c56f5b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Validator.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,7 @@ public static function datetime(
412412
if ($datetime->format($format) !== $data) {
413413
return false;
414414
}
415-
$lastErrors = \DateTime::getLastErrors();
416-
if ($lastErrors === false) {
417-
return true;
418-
}
419-
return $lastErrors['warning_count'] === 0
420-
&& $lastErrors['error_count'] === 0;
415+
return \DateTime::getLastErrors() === false;
421416
}
422417

423418
/**

0 commit comments

Comments
 (0)