I'm getting this error since the PHP 7.2 update: Code: [16:26:31] [Server thread/CRITICAL]: Unhandled exception executing command 'f create test' in f: count(): Parameter must be an array or an object that implements Countable [16:26:31] [Server thread/CRITICAL]: ErrorException: "count(): Parameter must be an array or an object that implements Countable" (EXCEPTION) in "plugins/GuildsRPG-master/src/FactionsPro/FactionCommands" at line 46 Code relevant to that line: PHP: if (count($args == 2)) { Please help
Read error "Parameter must be an array or an object that implements Countable" It means "== 2" don't have to be inside count() BECAUSE it don't implements Countable
What happened is you put the == inside the count() function. Here's what's happening: PHP: $foo = $args == 2var_dump($foo) // (bool) false// $args is not equal to 2, therefore $args == 2 evaluated to false So since PHP: $args == 2 returns false, you're pretty much saying PHP: count(false) . The count() function accepts an array as a parameter, and you're giving it a boolean. Just put the == outside of the count() function. (I know all this explanation was probably very unnecessary, I just wanted to explain to the OP exactly what was happening)
Try the latest builds of FactionsPro in the CI section of Poggit. These bugs, and more have now been fixed.