From: Guilherme Blanco Date: Sat, 10 Dec 2011 05:15:52 +0000 (-0500) Subject: 404 render must be called AFTER layout. The current values are wrong (layout is never... X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=8614a9a290239aed7b5819033da30418503748cf;p=zf2.biz%2Fapplication_blanche.git 404 render must be called AFTER layout. The current values are wrong (layout is never called), which in some weird situations may lead to $e->getResponse() return NULL. --- diff --git a/module/Application/src/Application/View/Listener.php b/module/Application/src/Application/View/Listener.php index 71ea50b..ac4c4b7 100644 --- a/module/Application/src/Application/View/Listener.php +++ b/module/Application/src/Application/View/Listener.php @@ -40,8 +40,8 @@ class Listener implements ListenerAggregate public function attach(EventCollection $events) { $this->listeners[] = $events->attach('dispatch.error', array($this, 'renderError')); - $this->listeners[] = $events->attach('dispatch', array($this, 'render404'), -80); - $this->listeners[] = $events->attach('dispatch', array($this, 'renderLayout'), -1000); + $this->listeners[] = $events->attach('dispatch', array($this, 'render404'), -1000); + $this->listeners[] = $events->attach('dispatch', array($this, 'renderLayout'), -80); } public function detach(EventCollection $events)