Merge pull request #21434 from nextcloud/bugfix/noid/dont-break-with-GenericEventWrapper
Don't break event listeners with the GenericEventWrapper
This commit is contained in:
commit
3539bd1751
|
@ -63,7 +63,7 @@ class SymfonyAdapter implements EventDispatcherInterface {
|
||||||
if ($event instanceof Event) {
|
if ($event instanceof Event) {
|
||||||
$this->eventDispatcher->dispatch($eventName, $event);
|
$this->eventDispatcher->dispatch($eventName, $event);
|
||||||
} else {
|
} else {
|
||||||
if ($event instanceof GenericEvent) {
|
if ($event instanceof GenericEvent && get_class($event) === GenericEvent::class) {
|
||||||
$newEvent = new GenericEventWrapper($this->logger, $eventName, $event);
|
$newEvent = new GenericEventWrapper($this->logger, $eventName, $event);
|
||||||
} else {
|
} else {
|
||||||
$newEvent = $event;
|
$newEvent = $event;
|
||||||
|
|
Loading…
Reference in New Issue