2
我使用了captcha组件和cakephp 2.0。虽然它进展顺利,但我跟踪这个组件的问题。Cakephp 2.0验证码组件给出了警告
Warning: Argument 1 passed to Component::__construct() must be an instance of ComponentCollection, none given, called in ...
当我试图找到解决它给了我在某处评论双线代码。
_controller = $collection->getController();
parent::__construct($collection, $settings);
function startup() {
$this->Controller = $this->_controller;
}
该解决方案的代码是这样的事情结束了我的错误。
验证码分量链路是http://www.devarticles.in/