count():参数必须是数组或对象,在C:\htdocs..\components\com_jcomments\tpl\joomspirit_theme\tpl_form.php中实现Countable
$customBBCodes = $this->getVar('comments-form-custombbcodes');
if (count($customBBCodes)) {
foreach($customBBCodes as $code) {
if ($code->button_enabled) {
$k = 'custombbcode' . $code->id;
$title = trim(JCommentsText::jsEscape($code->button_title));
$text = empty($code->button_prompt) ? JText::_('BBCODE_HINT_ENTER_TEXT') : JText::_($code->button_prompt);
$open_tag = $code->button_open_tag;
$close_tag = $code->button_close_tag;
$icon = $code->button_image;
$css = $code->button_css;
}
}
}
我在我的 Joomla 3.0 应用程序中使用 Apache 上的 PHP7.3 运行这个脚本。