This commit is contained in:
2020-11-18 14:59:22 +08:00
parent 1cf754d53e
commit 087d114af2
3 changed files with 3 additions and 10 deletions
+1 -6
View File
@@ -600,12 +600,7 @@ abstract class ClientAbstracts extends Component implements IClient
} else if (strpos($type, 'xml') !== false) {
return Help::xmlToArray($body);
} else if (strpos($type, 'plain') !== false) {
if (!is_null($json = JSON::decode($body))) {
return $json;
}
if (!is_null($json = Help::toArray($body))) {
return $json;
}
return Help::toArray($body);
}
return $body;
}