From f19f28a41d62acf89f11ad077550ebb38767aad6 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 3 Jul 2019 09:52:02 +0200 Subject: [PATCH] only decorate when an event dispatcher was passed --- src/Symfony/Component/Workflow/Workflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Workflow/Workflow.php b/src/Symfony/Component/Workflow/Workflow.php index e3df8cb0d0..76e53eda51 100644 --- a/src/Symfony/Component/Workflow/Workflow.php +++ b/src/Symfony/Component/Workflow/Workflow.php @@ -43,7 +43,7 @@ class Workflow implements WorkflowInterface { $this->definition = $definition; $this->markingStore = $markingStore ?: new MultipleStateMarkingStore(); - $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); + $this->dispatcher = null !== $dispatcher ? LegacyEventDispatcherProxy::decorate($dispatcher) : null; $this->name = $name; }