mirror of
https://github.com/friendica/friendica
synced 2024-12-23 14:00:15 +00:00
Quick fix to PR #2682
This commit is contained in:
parent
0f4e57fb95
commit
87fb0b7b26
2 changed files with 18 additions and 12 deletions
|
@ -768,6 +768,7 @@
|
|||
}
|
||||
|
||||
$data3 = array($root_element => $data2);
|
||||
|
||||
$ret = xml::from_array($data3, $xml, false, $namespaces);
|
||||
return $ret;
|
||||
}
|
||||
|
@ -2377,9 +2378,9 @@
|
|||
$res = array();
|
||||
$uri = $item['uri']."-l";
|
||||
foreach($activities as $k => $v) {
|
||||
$res[$k] = ( x($v,$uri) ? array_map("api_contactlink_to_array", $v[$uri]) : array() );
|
||||
$res[$k] = (x($v,$uri)?count($v[$uri]):0);
|
||||
#$res[$k] = ( x($v,$uri) ? array_map("api_contactlink_to_array", $v[$uri]) : array() );
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,8 +51,13 @@ class xml {
|
|||
$element = $xml;
|
||||
|
||||
if (is_integer($key)) {
|
||||
if (isset($element))
|
||||
$element[0] = $value;
|
||||
if (isset($element)) {
|
||||
if (is_scalar($value)) {
|
||||
$element[0] = $value;
|
||||
} else {
|
||||
/// @todo: handle nested array values
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue