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:
Joas Schilling 2020-06-17 11:55:14 +02:00 committed by GitHub
commit 3539bd1751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View 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;