Skip to content

Commit 6a45a21

Browse files
committed
Check Json types
1 parent dc0cd62 commit 6a45a21

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Common/Common.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public static function mysql_escape($fieldValue)
3737

3838
protected static function is_json($str): bool
3939
{
40+
if (!is_string($str)){
41+
return false;
42+
}
4043
return json_decode($str, true) !== null;
4144
}
4245
}

0 commit comments

Comments
 (0)