diff options
| author | 2017-12-19 09:35:37 +0100 | |
|---|---|---|
| committer | 2017-12-19 09:35:37 +0100 | |
| commit | 00776f454773d83b9c1db590f01122b24c06edbd (patch) | |
| tree | 747b41221a8b2032d48fa6e84100221d3d1a635b /app/Controllers/indexController.php | |
| parent | 95ed8dca5d0ddc1268a1ee63d4d2577fa1cc376a (diff) | |
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.
Diffstat (limited to 'app/Controllers/indexController.php')
| -rwxr-xr-x | app/Controllers/indexController.php | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |
