From 933d8fc631a4817e1507ccfa412cd403acebcdfd Mon Sep 17 00:00:00 2001 From: MENTAL <35723598+thisis-mental@users.noreply.github.com> Date: Mon, 3 Aug 2020 16:53:01 +0200 Subject: [PATCH] Fixing small bug when everything is read --- FreshRSS/FreshRSS.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/FreshRSS/FreshRSS.php b/FreshRSS/FreshRSS.php index a5c626724..5121191b6 100644 --- a/FreshRSS/FreshRSS.php +++ b/FreshRSS/FreshRSS.php @@ -47,8 +47,11 @@ class FreshRSS extends \App\SupportedApps implements \App\EnhancedApps { if($res->getStatusCode() == 200) { $body = json_decode($res->getBody()); if($body->auth === 1){ - $unread = count(explode(",", $body->unread_item_ids)); - $data['unread'] = $unread ?? 0; + if($body->unread_item_ids != ""){ + $data['unread'] = count(explode(",", $body->unread_item_ids)); + } else{ + $data['unread'] = 0; + } } }