开发者

Undefined property: ModelTask::$useDbConfig

开发者 https://www.devze.com 2022-12-20 10:07 出处:网络
in CakePHP book example here I try: cake bake all then I choose 1 for Group but i get an error Notice: Undefined 开发者_开发知识库property: ModelTask::$useDbConfig in

in CakePHP book example here I try: cake bake all then I choose 1 for Group

but i get an error

Notice: Undefined 开发者_开发知识库property: ModelTask::$useDbConfig in /opt/lampp/htdocs/acl_cake/cake/console/libs/tasks/model.php on line 848

Fatal error: ConnectionManager::getDataSource - Non-existent data source in /opt/lampp/htdocs/acl_cake/cake/libs/model/connection_manager.php on line 109


I solved the problem temporarily by adding

$this->useDbConfig = 'default';

at line 848 of the file cake/console/libs/tasks/model.php before the instruction

$data = $schema->read(array('models' => false, 'connection' => $this->useDbConfig));

And now the bake all is working.

0

精彩评论

暂无评论...
验证码 换一张
取 消