From 00776f454773d83b9c1db590f01122b24c06edbd Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Tue, 19 Dec 2017 09:35:37 +0100 Subject: PHP 7.2: Fix a warning when retrieving the list of entries (#1739) When retrieving the list of entries when the context was 'all' or 'starred', there was the following warning: > Warning: count(): Parameter must be an array or an object that implements Countable in /home/alexis/FreshRSS/app/Controllers/indexController.php on line 206 I fixed that by changing how the array is tested. --- app/Controllers/indexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Controllers/indexController.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index e8dde36fa..e3dbd4664 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -203,7 +203,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { $entryDAO = FreshRSS_Factory::createEntryDao(); $get = FreshRSS_Context::currentGet(true); - if (count($get) > 1) { + if (is_array($get)) { $type = $get[0]; $id = $get[1]; } else { -- cgit v1.2.3