From c75925a289e7c21bc677f0b26ea8c3e07bbed6da Mon Sep 17 00:00:00 2001 From: Kevin R <22906111+cgkkevinr@users.noreply.github.com> Date: Tue, 4 Jun 2019 16:15:48 +0200 Subject: [PATCH] Do not call parent constructor unless it exists Signed-off-by: Kevin R <22906111+cgkkevinr@users.noreply.github.com> --- src/EventDispatcher/AutowiredEventDispatcher.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EventDispatcher/AutowiredEventDispatcher.php b/src/EventDispatcher/AutowiredEventDispatcher.php index 75d06f50a708..4f3fa0c95a16 100644 --- a/src/EventDispatcher/AutowiredEventDispatcher.php +++ b/src/EventDispatcher/AutowiredEventDispatcher.php @@ -16,6 +16,8 @@ public function __construct(array $eventSubscribers) $this->addSubscriber($eventSubscriber); } - parent::__construct(); + if (method_exists(get_parent_class($this), '__construct')) { + parent::__construct(); + } } }