Skip to content

Commit 46a6c05

Browse files
committed
using the isset to check defined constant
1 parent b1e20a6 commit 46a6c05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,6 @@ private static function jsonLastError()
175175
$collections = self::jsonLastErrorCollections();
176176
$jsonLastError = json_last_error();
177177

178-
return array_key_exists($jsonLastError, $collections) ? $collections[$jsonLastError] : $collections['default'];
178+
return isset($jsonLastError) ? $collections[$jsonLastError] : $collections['default'];
179179
}
180180
}

0 commit comments

Comments
 (0)