]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't break event listeners with the GenericEventWrapper 21434/head
authorJoas Schilling <coding@schilljs.com>
Tue, 16 Jun 2020 17:30:36 +0000 (19:30 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 16 Jun 2020 17:30:36 +0000 (19:30 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/EventDispatcher/SymfonyAdapter.php

index 10e953be8439304aeba2b080f7b635f9a4db3022..f2b74a5ca633a957f351d3272572f7b811481254 100644 (file)
@@ -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;