Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 2d2f887

Browse files
committed
Skipping dispatch when a non-null MvcEvent#getResult() is detected
1 parent e78b531 commit 2d2f887

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DispatchListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public function attach(EventManagerInterface $events, $priority = 1)
7676
*/
7777
public function onDispatch(MvcEvent $e)
7878
{
79+
if (null !== $e->getResult()) {
80+
return;
81+
}
82+
7983
$routeMatch = $e->getRouteMatch();
8084
$controllerName = $routeMatch instanceof RouteMatch
8185
? $routeMatch->getParam('controller', 'not-found')

0 commit comments

Comments
 (0)