Skip to content

Commit c11113a

Browse files
authored
fix: update error text for consistency (#528)
1 parent 27179e1 commit c11113a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/JWT.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static function decode(
154154
// token can actually be used. If it's not yet that time, abort.
155155
if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) {
156156
$ex = new BeforeValidException(
157-
'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) $payload->nbf)
157+
'Cannot handle token with nbf prior to ' . \date(DateTime::ISO8601, (int) floor($payload->nbf))
158158
);
159159
$ex->setPayload($payload);
160160
throw $ex;
@@ -165,7 +165,7 @@ public static function decode(
165165
// correctly used the nbf claim).
166166
if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) {
167167
$ex = new BeforeValidException(
168-
'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) $payload->iat)
168+
'Cannot handle token with iat prior to ' . \date(DateTime::ISO8601, (int) floor($payload->iat))
169169
);
170170
$ex->setPayload($payload);
171171
throw $ex;

0 commit comments

Comments
 (0)