1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:25:55 +00:00

revise behavior of Feeds::_cat_of

This commit is contained in:
Andrew Dolgov
2021-03-02 09:36:44 +03:00
parent f097ae608d
commit 2005a7bf4f
2 changed files with 5 additions and 4 deletions

View File

@@ -1842,13 +1842,14 @@ class Feeds extends Handler_Protected {
return $rv;
}
static function _cat_of_feed($feed) {
// returns Uncategorized as 0
static function _cat_of($feed) : int {
$feed = ORM::for_table('ttrss_feeds')->find_one($feed);
if ($feed) {
return $feed->cat_id;
return (int)$feed->cat_id;
} else {
return false;
return -1;
}
}