Skip to content

Commit fccc42b

Browse files
committed
Releasing 1.1.13
2 parents 1a8c622 + 19530d8 commit fccc42b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/TgUtils/Date.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,10 @@ public static function createFromFormat($format, $timeString, $timezone = null)
423423
$timezone = new \DateTimeZone($timezone);
424424
}
425425
$d = \DateTime::createFromFormat($format, $timeString, $timezone);
426-
return self::createLocalInstance((int)$d->format('U'), $timezone);
426+
if ($d !== FALSE) {
427+
return self::createLocalInstance((int)$d->format('U'), $timezone);
428+
}
429+
return FALSE;
427430
}
428431

429432
public static function createFromMysql($timeString, $timezone = null) {

0 commit comments

Comments
 (0)