Skip to content
Snippets Groups Projects
Commit b68de25f authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

ExceptionStrategy : Correction pour passer à zendframework/zend-mvc 2.7 sans douleur.

parent 55f0b6b1
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ use UnicaenApp\Mvc\View\Http\ExceptionStrategy;
use UnicaenApp\Mvc\Listener\ModalListener;
use Zend\View\Helper\Navigation;
use Zend\View\HelperPluginManager;
use Zend\Mvc\View\Http\ExceptionStrategy as HttpExceptionStrategy;
use Zend\Mvc\View\Console\ExceptionStrategy as ConsoleExceptionStrategy;
define('__VENDOR_DIR__', dirname(dirname(__DIR__)));
......@@ -88,10 +90,12 @@ class Module implements
AbstractValidator::setDefaultTranslator(new Translator($translator));
$eventManager = $application->getEventManager();
$viewManager = $services->get('view_manager');
// Correction pour passer à zendframework/zend-mvc 2.7 sans douleur.
/** @var HttpExceptionStrategy|ConsoleExceptionStrategy $baseExceptionStrategy */
$baseExceptionStrategy = $services->get('ExceptionStrategy');
$exceptionStrategy = new ExceptionStrategy();
$exceptionStrategy->setDisplayExceptions($viewManager->getExceptionStrategy()->displayExceptions());
$exceptionStrategy->setDisplayExceptions($baseExceptionStrategy->displayExceptions());
$exceptionStrategy->attach($eventManager);
/* Démarrage des mouchards en fonction de la configuration... */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment