aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/EventDispatcher/SymfonyAdapter.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-05 12:04:55 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-05 12:14:47 +0100
commitf6ddda8dadeed923a213f66d96d4e9f0a7d6b9fa (patch)
tree6dc098899704db2660fc61f36af3bd36effbadec /lib/private/EventDispatcher/SymfonyAdapter.php
parent4b97ef9b41c876517b788dbae601b23f11d26096 (diff)
downloadnextcloud-server-f6ddda8dadeed923a213f66d96d4e9f0a7d6b9fa.tar.gz
nextcloud-server-f6ddda8dadeed923a213f66d96d4e9f0a7d6b9fa.zip
Test the symfony adapter
To prevent regression in the future. And make sure we always return an object … Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/EventDispatcher/SymfonyAdapter.php')
-rw-r--r--lib/private/EventDispatcher/SymfonyAdapter.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/EventDispatcher/SymfonyAdapter.php b/lib/private/EventDispatcher/SymfonyAdapter.php
index b1e5aa86049..3bd74e719fb 100644
--- a/lib/private/EventDispatcher/SymfonyAdapter.php
+++ b/lib/private/EventDispatcher/SymfonyAdapter.php
@@ -87,7 +87,8 @@ class SymfonyAdapter implements EventDispatcherInterface {
// Event with no payload (object) need special handling
if ($newEvent === null) {
- return $this->eventDispatcher->getSymfonyDispatcher()->dispatch($eventName);
+ $this->eventDispatcher->getSymfonyDispatcher()->dispatch($eventName);
+ return new Event();
}
// Flip the argument order for Symfony to prevent a trigger_error