Przeglądaj źródła

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.
Alexis Degrugillier 8 lat temu
rodzic
commit
00776f4547
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/Controllers/indexController.php

+ 1 - 1
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 {