Skip to content

Commit b8d39e2

Browse files
authored
Fix createFromFormat for PHP 8 (#278)
1 parent 56ab933 commit b8d39e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private static function createFromRegular(\DateTime $datetime): self
2424
*/
2525
public static function createFromFormat($format, $time, $timezone = null): self
2626
{
27-
$datetime = parent::createFromFormat($format, $time, $timezone);
27+
$datetime = \DateTime::createFromFormat($format, $time, $timezone);
2828
if ($datetime === false) {
2929
throw DatetimeException::createFromPhpError();
3030
}

0 commit comments

Comments
 (0)