I am getting errors in my apache log on the plugin called CSS Javascript Toolbox. The error is this:
PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in .../public_html/wp-content/plugins/css-javascript-toolbox/framework/events/subjects/hook.subject.php on line 81 and 82
The snippet where the code is this is:
protected function init($name, $target, $defintion, $includes) {
// Initialize parent!
$return = parent::init($name, $target, $defintion, $includes);
$this->hookName = strtolower("{$this->definition['targetClass']}_{$name}");
// Register Wordpress Filter,
add_action($this->getHookName(), array(&$this, 'trigger'), 10, count($this->getDefinition('parameters')));
add_action($this->getInstanceHookName(), array(&$this, 'trigger'), 10, count($this->getDefinition('parameters')));
return $return;
}
I am using PHP 7.2 and have read in some forums that if a downgrade to PHP 7.1 is done this problem might stop.
I did not want to downgrade because I have other plugins installed and all are working very well with PHP 7.2, only this one is reporting this problem.
What can I do to fix it? Anyone have any suggestions?