Skip to content

Commit af35026

Browse files
committed
json data single quotes
1 parent 2c31117 commit af35026

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
@@ -54,6 +54,9 @@ protected static function is_json($str): bool
5454
protected static function safeJson($jsonData,$asArray = false){
5555
$jsonData = json_decode($jsonData,true);
5656
$safeJsonData = [];
57+
if (!is_array($jsonData)){
58+
return $jsonData;
59+
}
5760
foreach ($jsonData as $key => $value){
5861
if (self::is_json($value)){
5962
$safeJsonData[$key] = self::safeJson($value,true);

0 commit comments

Comments
 (0)