You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
if (!preg_match('/Failed to parse time string \(\+([^)]+)\)/',$e->getMessage(),$m)) {
79
-
throw$e;
80
-
}
75
+
try {
76
+
$nowPlusInterval = @$now->modify('+' .$interval);
77
+
}catch (\DateMalformedStringException$e) {
78
+
thrownew \LogicException(\sprintf('Cannot parse interval "%s", please use a valid unit as described on https://www.php.net/datetime.formats.relative.',$interval),0,$e);
79
+
}
81
80
82
-
thrownew \LogicException(sprintf('Cannot parse interval "%s", please use a valid unit as described on https://www.php.net/datetime.formats.relative.',$m[1]));
81
+
if (!$nowPlusInterval) {
82
+
thrownew \LogicException(\sprintf('Cannot parse interval "%s", please use a valid unit as described on https://www.php.net/datetime.formats.relative.',$interval));