Skip to content

Commit

Permalink
chore: skip null checks when input is never null (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai authored May 3, 2023
1 parent 2bc0128 commit d957f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public static function jsonEncode(array $input): string
}
if ($errno = \json_last_error()) {
self::handleJsonError($errno);
} elseif ($json === 'null' && $input !== null) {
} elseif ($json === 'null') {
throw new DomainException('Null result with non-null input');
}
if ($json === false) {
Expand Down

0 comments on commit d957f8e

Please sign in to comment.