jdolieslager/FeTranslator — pull request #3 by WickedyMike (2013-05-14 10:31:33+00:00)
Title: Quick "fix" (not really, but no more Exceptions) for error pages

Prevents throwing exceptions (and only partially outputting page) for error pages (eg. 404)

Prevents (not fixes!) this exception
```
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP Catchable fatal error: Argument 2 passed to FeTranslator\\View\\Helper\\TranslateUrl::__construct() must be an instance of Zend\\Mvc\\Router\\RouteMatch, null given, called in /home/mike/Sites/matchclub/vendor/jdolieslager/fetranslator/config/viewhelper.config.php on line 20 and defined in /home/mike/Sites/matchclub/vendor/jdolieslager/fetranslator/src/FeTranslator/View/Helper/TranslateUrl.php on line 33
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP Stack trace:
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 1. {main}() /home/mike/Sites/matchclub/docs/index.php:0
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 2. Zend\\Mvc\\Application->run() /home/mike/Sites/matchclub/docs/index.php:29
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 3. Zend\\Mvc\\Application->completeRequest() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:285
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 4. Zend\\EventManager\\EventManager->trigger() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:332
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 5. Zend\\EventManager\\EventManager->triggerListeners() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:207
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 6. call_user_func() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:472
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 7. Zend\\Mvc\\View\\Http\\DefaultRenderingStrategy->render() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php:472
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 8. Zend\\View\\View->render() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php:126
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 9. Zend\\View\\Renderer\\PhpRenderer->render() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/View.php:205
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 10. include() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php:507
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 11. Zend\\View\\Renderer\\PhpRenderer->footer() /home/mike/Sites/matchclub/module/MatchClub/view/layout/layout.phtml:39
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 12. Zend\\View\\Renderer\\PhpRenderer->__call() /home/mike/Sites/matchclub/module/MatchClub/view/layout/layout.phtml:39
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 13. call_user_func_array() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php:400
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 14. ZendAdditionals\\View\\Helper\\Widget\\AbstractWidget->__invoke() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php:400
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 15. ZendAdditionals\\View\\Helper\\Widget\\AbstractWidget->render() /home/mike/Sites/matchclub/vendor/ratus/zend-additionals/library/ZendAdditionals/View/Helper/Widget/AbstractWidget.php:140
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 16. Zend\\View\\Renderer\\PhpRenderer->render() /home/mike/Sites/matchclub/vendor/ratus/zend-additionals/library/ZendAdditionals/View/Helper/Widget/AbstractWidget.php:243
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 17. include() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php:507
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 18. Zend\\View\\Renderer\\PhpRenderer->feTranslateUrl() /home/mike/Sites/matchclub/module/MatchClub/view/widgets/footer.phtml:14
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 19. Zend\\View\\Renderer\\PhpRenderer->__call() /home/mike/Sites/matchclub/module/MatchClub/view/widgets/footer.phtml:14
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 20. Zend\\View\\Renderer\\PhpRenderer->plugin() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php:397
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 21. Zend\\ServiceManager\\AbstractPluginManager->get() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php:378
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 22. Zend\\ServiceManager\\ServiceManager->get() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/ServiceManager/AbstractPluginManager.php:103
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 23. Zend\\ServiceManager\\ServiceManager->create() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:441
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 24. Zend\\ServiceManager\\AbstractPluginManager->createFromFactory() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:494
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 25. Zend\\ServiceManager\\ServiceManager->createServiceViaCallback() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/ServiceManager/AbstractPluginManager.php:205
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 26. call_user_func() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:737
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 27. FeTranslator\\Module->{closure:/home/mike/Sites/matchclub/vendor/jdolieslager/fetranslator/config/viewhelper.config.php:10-21}() /home/mike/Sites/matchclub/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:737
[Tue May 14 12:27:16 2013] [error] [client 172.16.6.232] PHP 28. FeTranslator\\View\\Helper\\TranslateUrl->__construct() /home/mike/Sites/matchclub/vendor/jdolieslager/fetranslator/config/viewhelper.config.php:20
```