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

Commit 0ce89d1

Browse files
committed
Skipping dispatch if an MvcEvent#getResult() is not null (fixes tests)
1 parent a37be06 commit 0ce89d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MiddlewareListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function attach(EventManagerInterface $events, $priority = 1)
4545
*/
4646
public function onDispatch(MvcEvent $event)
4747
{
48+
if (null !== $event->getResult()) {
49+
return;
50+
}
51+
4852
$routeMatch = $event->getRouteMatch();
4953
$middleware = $routeMatch->getParam('middleware', false);
5054
if (false === $middleware) {

0 commit comments

Comments
 (0)