Skip to content

Commit

Permalink
Merge pull request #29342 from LarsGrevelink/fix-unsuppressible-valid…
Browse files Browse the repository at this point in the history
…ator-warnings

[5.8] Use date_create to prevent unsuppressible date validator warnings
  • Loading branch information
taylorotwell authored Jul 30, 2019
2 parents 0b537f5 + e07f39b commit ed3edd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ protected function getDateTime($value)
return Date::parse($value);
}

return new DateTime($value);
return date_create($value);
} catch (Exception $e) {
//
}
Expand Down

0 comments on commit ed3edd0

Please sign in to comment.