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/