Skip to content

Commit baa97b8

Browse files
committed
Check Json types
1 parent ffe8ced commit baa97b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Common/Common.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function mysql_escape($fieldValue)
2121
}
2222

2323
if(self::is_json($fieldValue)){
24-
return $fieldValue;
24+
return self::safeJson($fieldValue);
2525
}
2626

2727
if (!empty($fieldValue) && is_string($fieldValue)) {
@@ -38,7 +38,7 @@ public static function mysql_escape($fieldValue)
3838
protected static function safeJsonString($fieldValue){
3939
return str_replace(
4040
["'"],
41-
["\'"],
41+
["\\'"],
4242
$fieldValue
4343
);
4444
}

0 commit comments

Comments
 (0)