Skip to content

Commit 3cd6244

Browse files
committed
Fix #332: submit: HTTP 400 when "negative" dates are passed
1 parent aef3c04 commit 3cd6244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

okapi/services/logs/submit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private static function _call(OkapiRequest $request)
6464
if ($tmp)
6565
{
6666
$when = strtotime($tmp);
67-
if (!$when)
67+
if ($when < 1)
6868
throw new InvalidParam('when', "'$tmp' is not in a valid format or is not a valid date.");
6969
if ($when > time() + 5*60)
7070
throw new CannotPublishException(_("You are trying to publish a log entry with a date in future. ".

0 commit comments

Comments
 (0)