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 committed 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
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.