Cakephp AclExtras警告错误

Cakephp AclExtras警告错误,cakephp,Cakephp,在中,我正在执行以下命令: ./Console/cake AclExtras.AclExtras aco_sync 我得到一个警告错误: Warning Error: Argument 1 passed to Component::startup() must be an instance of Controller, null given, called in /opt/lampp/htdocs/acl/app/Plugin/AclExtras/Console/Command/AclEx

在中,我正在执行以下命令:

./Console/cake AclExtras.AclExtras aco_sync
我得到一个警告错误:

Warning Error: Argument 1 passed to Component::startup() must be an instance of Controller, 
null given, called in 
/opt/lampp/htdocs/acl/app/Plugin/AclExtras/Console/Command/AclExtrasShell.php 
on line 80 and defined in [/opt/lampp/htdocs/acl/lib/Cake/Controller/Component.php, line 119]
acos表在
model
字段中填充
NULL
,在
外键的所有字段中填充
NULL

如何修复此错误


谢谢

在AclExtras/Console/Command中,请将启动功能更改为:

public function startup() {
    parent::startup();
    $controller = new Controller();
    $collection = new ComponentCollection();
    $this->Acl = new AclComponent($collection);
    $this->Acl->startup($controller);
    $this->Aco = $this->Acl->Aco;
}

mustapha可能有正确的答案,因为这段代码的更改使它变成了CakePHP本身。参见GitHub: