Skip to content

Commit

Permalink
Add check whether value is null
Browse files Browse the repository at this point in the history
  • Loading branch information
indykoning authored Oct 24, 2024
1 parent 3bb8643 commit fd9fd7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Support/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class Json
public static function isJson($value): bool
{
if (
is_array($value)
$value === null
|| is_array($value)
|| is_object($value)
|| (is_string($value) && ! str_starts_with($value, '[') && ! str_starts_with($value, '{'))
) {
Expand Down

0 comments on commit fd9fd7c

Please sign in to comment.