diff --git a/classes/feeds.php b/classes/feeds.php index 493fe8a97..cc641b4f2 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -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; } } diff --git a/classes/rssutils.php b/classes/rssutils.php index 1bac2c475..e3d717e73 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -1713,7 +1713,7 @@ class RSSUtils { $filters = array(); $feed_id = (int) $feed_id; - $cat_id = (int)Feeds::_cat_of_feed($feed_id); + $cat_id = Feeds::_cat_of($feed_id); if (!$cat_id) $null_cat_qpart = "cat_id IS NULL OR";