mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:50:11 +00:00
Continued:
- used x() to make sure the array key is there, else an E_NOTICE is triggered - added type-hints where it is safe Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
17a39340b5
commit
e0a07d5f27
2 changed files with 5 additions and 5 deletions
|
@ -935,7 +935,7 @@ function api_reformat_xml(&$item, &$key)
|
|||
*
|
||||
* @return string The XML data
|
||||
*/
|
||||
function api_create_xml($data, $root_element)
|
||||
function api_create_xml(array $data, $root_element)
|
||||
{
|
||||
$childname = key($data);
|
||||
$data2 = array_pop($data);
|
||||
|
@ -960,7 +960,7 @@ function api_create_xml($data, $root_element)
|
|||
$i = 1;
|
||||
|
||||
foreach ($data2 as $item) {
|
||||
$data4[$i++.":".$childname] = $item;
|
||||
$data4[$i++ . ":" . $childname] = $item;
|
||||
}
|
||||
|
||||
$data2 = $data4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue