From: Joas Schilling Date: Tue, 16 Jun 2020 17:30:36 +0000 (+0200) Subject: Don't break event listeners with the GenericEventWrapper X-Git-Tag: v20.0.0beta1~409^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c76fa60571788ec8ab12f23269f5e16f2769061c;p=nextcloud-server.git Don't break event listeners with the GenericEventWrapper Signed-off-by: Joas Schilling --- diff --git a/lib/private/EventDispatcher/SymfonyAdapter.php b/lib/private/EventDispatcher/SymfonyAdapter.php index 10e953be843..f2b74a5ca63 100644 --- a/lib/private/EventDispatcher/SymfonyAdapter.php +++ b/lib/private/EventDispatcher/SymfonyAdapter.php @@ -63,7 +63,7 @@ class SymfonyAdapter implements EventDispatcherInterface { if ($event instanceof Event) { $this->eventDispatcher->dispatch($eventName, $event); } else { - if ($event instanceof GenericEvent) { + if ($event instanceof GenericEvent && get_class($event) === GenericEvent::class) { $newEvent = new GenericEventWrapper($this->logger, $eventName, $event); } else { $newEvent = $event;