From: fabrixxm Date: Wed, 13 Jul 2016 16:35:55 +0000 (+0200) Subject: API: Fix `api_array_to_xml()` X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=95b7de631321a7b61b7e1524abe0a42980435d5f;p=friendica.git API: Fix `api_array_to_xml()` --- diff --git a/include/api.php b/include/api.php index c86a3cbe4b..9b245a73ee 100644 --- a/include/api.php +++ b/include/api.php @@ -688,8 +688,9 @@ function api_array_to_xml($data, $ename="") { $attrs=""; $childs=""; - if (count($data)==1 && !is_array($data[0])) { + if (count($data)==1 && !is_array($data[array_keys($data)[0]])) { $ename = array_keys($data)[0]; + $ename = trim($ename,'$'); $v = $data[$ename]; return "<$ename>$v"; }