Skip to content

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

@nicobustillos

Description

@nicobustillos

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions