From d957f8e9956ab94a587fe2bd3334411483088d70 Mon Sep 17 00:00:00 2001 From: Alexey Kopytko Date: Thu, 4 May 2023 06:26:21 +0900 Subject: [PATCH] chore: skip null checks when input is never null (#502) --- src/JWT.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JWT.php b/src/JWT.php index b7ca20d1..61524e7b 100644 --- a/src/JWT.php +++ b/src/JWT.php @@ -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) {