0

当我尝试从http://bakery.cakephp.org/articles/tbsmcd/2011/02/05/recaptcha_plugin_6添加recaptcha 插件时,显示以下错误。

Strict (2048):RecaptchaComponent::startup() 的声明应该与 Component::startup(Controller $controller) 兼容 [APP/Plugin/recaptcha_plugin/Controller/Component/RecaptchaComponent.php,第 17 行]

Strict (2048):ValidationBehavior::beforeValidate() 的声明应该与 ModelBehavior::beforeValidate(Model $model) [APP/Plugin/recaptcha_plugin/Model/Behavior/ValidationBehavior.php,第 2 行] 兼容* *

提前致谢。

4

1 回答 1

1

您是否正在尝试将此 CakePHP 1.3 插件与 CakePHP 2.x 一起使用?我问的原因是文件名recaptcha_plugin不遵循 CakePHP 约定。按照Git Repo上的自述文件进行操作。

看起来您需要重命名插件目录中的插件文件夹:

/app/Plugin/Recaptcha
于 2013-01-21T21:29:30.740 回答