summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-02 19:21:27 +0300
committerAndrew Dolgov <[email protected]>2021-03-02 19:21:27 +0300
commit9ec07329429ce6fdb3844d099a873b54819e77eb (patch)
tree56e48eef53b90d50d80acb24ac18eed528a41871
parentba86c64d38d9995d38af163ae4c51a42b21d5de7 (diff)
parentc4b78ed0a6cfd3858f42c7330fe2f8a2811c1336 (diff)
Merge branch 'master' of git.tt-rss.org:fox/tt-rss
-rwxr-xr-xclasses/api.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/api.php b/classes/api.php
index 991682191..952c97166 100755
--- a/classes/api.php
+++ b/classes/api.php
@@ -98,8 +98,8 @@ class API extends Handler {
}
function getUnread() {
- $feed_id = clean($_REQUEST["feed_id"]);
- $is_cat = clean($_REQUEST["is_cat"]);
+ $feed_id = clean($_REQUEST["feed_id"] ?? "");
+ $is_cat = clean($_REQUEST["is_cat"] ?? "");
if ($feed_id) {
$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;
- $limit = (int)clean($_REQUEST["limit"]);
+ $limit = (int)clean($_REQUEST["limit"] ?? 0 );
if (!$limit || $limit >= 200) $limit = 200;
- $offset = (int)clean($_REQUEST["skip"]);
+ $offset = (int)clean($_REQUEST["skip"] ?? 0);
$filter = clean($_REQUEST["filter"] ?? "");
$is_cat = self::_param_to_bool(clean($_REQUEST["is_cat"] ?? 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 */
$view_mode = clean($_REQUEST["view_mode"] ?? null);
$include_attachments = self::_param_to_bool(clean($_REQUEST["include_attachments"] ?? false));