Modx:可捕获的致命错误:传递给modParser::collectElementTags()的参数2必须是数组类型,


Modx: Catchable fatal error: Argument 2 passed to modParser::collectElementTags() must be of the type array, null given

刚开始新项目,想尝试ModX将其用于项目,但遇到了这个错误(它不会消失):

**Catchable fatal error: Argument 2 passed to modParser::collectElementTags() must be of the type array, null given, called in D:'Personal'illumation'modx'core'model'modx'modstaticresource.class.php on line 57 and defined in D:'Personal'illumation'modx'core'model'modx'modparser.class.php on line 101**

在我想尝试编写插件的时候出现了问题,所以我在Manager的一个名为webit-core-plugin.php的外部文件中创建了一个新插件。向其中添加一个事件并保存。之后,会出现上述错误。

试着把它取下来,再做一次等等,都无济于事。有人知道发生了什么事吗?

我使用最新的XAMPP、最新的SQL/PHP和最新的ModX,它们在本地主机(windows7)上运行,具有管理员权限。

  1. 通过文件浏览器删除缓存文件夹,手动清除该文件夹
  2. 打开SQL客户端,检查"static"字段为1但"static_file"为空的元素(模板-*modx_site_templates*、块-*modx_site_htmlsnippets*、片段-*mod_xsite_snippets*和插件-*modx-site_plugins*)