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.
pull/1752/head
Alexis Degrugillier 7 years ago committed by Alexandre Alapetite
parent 95ed8dca5d
commit 00776f4547
  1. 2
      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 {

Loading…
Cancel
Save