Wikifab / wikifab-main

Follow this tutorial to install you own Wikifab
Other
82 stars 21 forks source link

count(): Parameter must be an array or an object that implements Countable in .../wikifab2/extensions/Explore/includes/WfExploreTag.php on line 23 #23

Open nicobustillos opened 5 years ago

nicobustillos commented 5 years ago

It first happens when I run maintenance/initWikifab.php --setWikifabHomePage --int as a Warning, but with no further error the command is executed. But when you visit the website the same error appears in the top of the site. I've used method #2 of installation using current master branch. I'm definitely noob both in Wikifab and PHP, but I went ahead and modified the code at line 23 from wikifab/extensions/Explore/includes/WfExploreTag.php with the following:

if (is_array($filters)) { ; } else { if(count($filters > 1)) { // if only one params, it will set coreclty with the new way to extrct params foreach ($filters as $key) { $options[$key] = true; } } }

And then it all works just fine. But surely there is a better way :)