简体   繁体   English

如何解决致命错误:在ZF2 Apigility中找不到资源未捕获的异常?

[英]How can I resolve Fatal Error:Uncaught exception with Resource not found in ZF2 Apigility?

Fatal error: Uncaught exception 'Zend\Permissions\Acl\Exception\InvalidArgumentException' with message 'Resource 'welcome' not found' in /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php on line 292
 Zend\Permissions\Acl\Exception\InvalidArgumentException: Resource 'welcome' not found in /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php on line 292
 Call Stack: 0.0001 627128
 1. {main}() /home/prateek.parekh/catalystapi/public/index.php:0 0.0257 720168 
 2. Zend\Mvc\Application::init() /home/prateek.parekh/catalystapi/public/index.php:56 1.2016 3360648
 3. Zend\Mvc\Application->bootstrap() /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:260 1.3708 3632792
 4. Zend\EventManager\EventManager->trigger() /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:156 1.3710 3633136
 5. Zend\EventManager\EventManager->triggerListeners() /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:207 1.5567 3955048
 6. call_user_func:{/home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468}() /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468 1.5568 3955080
 7. Application\Module->onBootstrap() /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:468 1.7301 4243984
 8. Catalyst\Permissions\Plugin\AclPlugin->doAuthorization() /home/prateek.parekh/catalystapi/module/Application/Module.php:29 1.7531 4246600
 9. Zend\Permissions\Acl\Acl->isAllowed() /home/prateek.parekh/catalystapi/vendor/catalyst/Catalyst/Permissions/Plugin/AclPlugin.php:48 1.7534 4246696
 10. Zend\Permissions\Acl\Acl->getResource() /home/prateek.parekh/catalystapi/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php:731 

Can someone guide me as to what is the logical step to solve this? 有人可以指导我解决该问题的逻辑步骤是什么? I tried disabling doAuthorization($e) in Application/Module.php . 我尝试在Application/Module.php禁用doAuthorization($e)

Adding 新增中

'ZF\\Apigility\\Welcome'

to application.config.php 'modules' array will solve this issue provided 到application.config.php'modules'数组将解决此问题

'ZF\Apigility\Welcome'

is present in development.config.php 存在于development.config.php中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM