dsewbh5588 2019-02-14 06:27
浏览 68

如何在wordpress的css javascript工具箱插件中修复错误'参数必须是实现Countable的数组或对象'

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?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题