我正在使用带有 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/