From f6ddda8dadeed923a213f66d96d4e9f0a7d6b9fa Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 5 Feb 2021 12:04:55 +0100 Subject: Test the symfony adapter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To prevent regression in the future. And make sure we always return an object … Signed-off-by: Christoph Wurst --- lib/private/EventDispatcher/SymfonyAdapter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/private/EventDispatcher/SymfonyAdapter.php') 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 -- cgit v1.2.3