Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6f21a0

Browse files
committed
[EventDispatcher] Try first if the event is Stopped
1 parent 1314365 commit c6f21a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/EventDispatcher/EventDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ public function removeSubscriber(EventSubscriberInterface $subscriber)
155155
protected function doDispatch($listeners, $eventName, Event $event)
156156
{
157157
foreach ($listeners as $listener) {
158-
call_user_func($listener, $event);
159158
if ($event->isPropagationStopped()) {
160159
break;
161160
}
161+
call_user_func($listener, $event);
162162
}
163163
}
164164

0 commit comments

Comments
 (0)