Skip to content

Commit

Permalink
discard date interval errors as the format is not user provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Jan 19, 2025
1 parent dc32a6d commit c57876d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PointInTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,6 @@ private static function dateInterval(Period $period): ?\DateInterval
}

/** @psalm-suppress ImpureMethodCall */
return \DateInterval::createFromDateString(\implode(' + ', $parts));
return \DateInterval::createFromDateString(\implode(' + ', $parts)) ?: null;
}
}

0 comments on commit c57876d

Please sign in to comment.