Merge pull request 'Fix undefined array key warnings when using iOS app' (#12) from sam302psu/tt-rss:undefined-array-keys into master

Reviewed-on: https://git.tt-rss.org/fox/tt-rss/pulls/12
master
fox 4 years ago
commit c4b78ed0a6

@ -98,8 +98,8 @@ class API extends Handler {
} }
function getUnread() { function getUnread() {
$feed_id = clean($_REQUEST["feed_id"]); $feed_id = clean($_REQUEST["feed_id"] ?? "");
$is_cat = clean($_REQUEST["is_cat"]); $is_cat = clean($_REQUEST["is_cat"] ?? "");
if ($feed_id) { if ($feed_id) {
$this->_wrap(self::STATUS_OK, array("unread" => getFeedUnread($feed_id, $is_cat))); $this->_wrap(self::STATUS_OK, array("unread" => getFeedUnread($feed_id, $is_cat)));
@ -188,15 +188,15 @@ class API extends Handler {
if (is_numeric($feed_id)) $feed_id = (int) $feed_id; if (is_numeric($feed_id)) $feed_id = (int) $feed_id;
$limit = (int)clean($_REQUEST["limit"]); $limit = (int)clean($_REQUEST["limit"] ?? 0 );
if (!$limit || $limit >= 200) $limit = 200; if (!$limit || $limit >= 200) $limit = 200;
$offset = (int)clean($_REQUEST["skip"]); $offset = (int)clean($_REQUEST["skip"] ?? 0);
$filter = clean($_REQUEST["filter"] ?? ""); $filter = clean($_REQUEST["filter"] ?? "");
$is_cat = self::_param_to_bool(clean($_REQUEST["is_cat"] ?? false)); $is_cat = self::_param_to_bool(clean($_REQUEST["is_cat"] ?? false));
$show_excerpt = self::_param_to_bool(clean($_REQUEST["show_excerpt"] ?? false)); $show_excerpt = self::_param_to_bool(clean($_REQUEST["show_excerpt"] ?? false));
$show_content = self::_param_to_bool(clean($_REQUEST["show_content"])); $show_content = self::_param_to_bool(clean($_REQUEST["show_content"] ?? false));
/* all_articles, unread, adaptive, marked, updated */ /* all_articles, unread, adaptive, marked, updated */
$view_mode = clean($_REQUEST["view_mode"] ?? null); $view_mode = clean($_REQUEST["view_mode"] ?? null);
$include_attachments = self::_param_to_bool(clean($_REQUEST["include_attachments"] ?? false)); $include_attachments = self::_param_to_bool(clean($_REQUEST["include_attachments"] ?? false));

Loading…
Cancel
Save