From: Michael Date: Thu, 4 Feb 2021 18:14:15 +0000 (+0000) Subject: Handle empty values for API output X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=69aad853ee23d2fa679fbc7f558cbe3853b7ed06;p=friendica.git Handle empty values for API output --- diff --git a/include/api.php b/include/api.php index e6d62c57ae..2da72f8d25 100644 --- a/include/api.php +++ b/include/api.php @@ -2931,6 +2931,10 @@ function api_format_items($items, $user_info, $filter_user = false, $type = "jso $ret = []; + if (empty($items)) { + return $ret; + } + foreach ((array)$items as $item) { list($status_user, $author_user, $owner_user) = api_item_get_user($a, $item);