Handle empty values for API output

This commit is contained in:
Michael 2021-02-04 18:14:15 +00:00
parent 2b6b72f7fd
commit 69aad853ee

View file

@ -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);