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
+2 -2
View File
@@ -38,13 +38,13 @@ class Help
public static function toArray($xml)
{
if (empty($xml)) {
return [];
return null;
} else if (is_array($xml)) {
return $xml;
}
$xml = Xml::isXml($xml);
if (!$xml) {
return [];
return static::jsonToArray($xml);
}
return $xml;
}