api, getHeadlines: properly accept feed_id 0

This commit is contained in:
Andrew Dolgov 2021-12-01 19:04:42 +03:00
parent be94a3a791
commit 5df8dacf9f
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class API extends Handler {
function getHeadlines(): bool {
$feed_id = clean($_REQUEST["feed_id"] ?? "");
if (!empty($feed_id)) {
if (!empty($feed_id) || is_numeric($feed_id)) { // is_numeric for feed_id "0"
$limit = (int)clean($_REQUEST["limit"] ?? 0 );
if (!$limit || $limit >= 200) $limit = 200;