sforkowany z mirror/friendica
Handle empty values for API output
rodzic
2b6b72f7fd
commit
69aad853ee
|
@ -2931,6 +2931,10 @@ function api_format_items($items, $user_info, $filter_user = false, $type = "jso
|
||||||
|
|
||||||
$ret = [];
|
$ret = [];
|
||||||
|
|
||||||
|
if (empty($items)) {
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ((array)$items as $item) {
|
foreach ((array)$items as $item) {
|
||||||
list($status_user, $author_user, $owner_user) = api_item_get_user($a, $item);
|
list($status_user, $author_user, $owner_user) = api_item_get_user($a, $item);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue