From 9c351bad6869c255a04d3ac8d2398e686e1d9286 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 8 Apr 2018 00:55:05 +0200 Subject: [PATCH 1/2] Fix wrong use of empty() --- include/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index f5fb96cb47..34b1352ce3 100644 --- a/include/api.php +++ b/include/api.php @@ -3354,7 +3354,7 @@ function api_lists_statuses($type) unset($_GET["screen_name"]); $user_info = api_get_user($a); - if (empty($_REQUEST, 'list_id')) { + if (empty($_REQUEST['list_id'])) { throw new BadRequestException('list_id not specified'); } From d0591dd8824592cf6b87cfe6938a730a6c2aa5c2 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sun, 8 Apr 2018 01:05:33 +0200 Subject: [PATCH 2/2] The first argument for api_format_items() must be an array --- include/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index 34b1352ce3..fd5d22dc09 100644 --- a/include/api.php +++ b/include/api.php @@ -3403,7 +3403,7 @@ function api_lists_statuses($type) $_REQUEST['list_id'] ); - $items = api_format_items($statuses, $user_info, false, $type); + $items = api_format_items(dba::inArray($statuses), $user_info, false, $type); $data = ['status' => $items]; switch ($type) {