neilime / zf2-assets-bundle

AssetsBundle is a module for Zend Framework 2 allowing asset managment (bundling & caching)
https://neilime.github.io/zf2-assets-bundle/
MIT License
33 stars 20 forks source link

Going to unknown Controller throws uncaught ServiceNotFoundException #47

Closed chielsen closed 7 years ago

chielsen commented 8 years ago

In AssetsBundle\Service\Service on line 96 you are getting the Controller class, without checking if it exists. So instead of showing a 404 page, I'm getting an uncaught Exception.

Maybe check if an error param is given or check if the class can be loaded

neilime commented 8 years ago

Please can you try with the very last version ?

chielsen commented 8 years ago

Cool, thanks for the quick response :)

chielsen commented 8 years ago

A but it's not working, fix should be:

if ($oControllerLoader->has($sControllerName) && ($oController = $oControllerLoader->get($sControllerName))) {

neilime commented 8 years ago

Sure, you're right. Sorry for this error. Fixed.