From 7ac4174c3202f3c6e671e1186246627d9b2d8c7f Mon Sep 17 00:00:00 2001 From: Divesh Pahuja Date: Mon, 6 Nov 2023 12:24:45 +0100 Subject: [PATCH] Fix sending parallel mutation requests cause 500 internal server error - resolves #793 --- src/Configuration.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Configuration.php b/src/Configuration.php index a10a057c..9b83cdd2 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -80,7 +80,7 @@ public function __construct($type, $path, $name = null, $configuration = null) $this->setType($type); $this->setPath($path); $this->setName($name); - $this->setConfiguration($configuration ?? []); + $this->setConfiguration($configuration); } public function getObjectVars(): array @@ -148,12 +148,10 @@ public function setType(string $type): void */ public function setConfiguration($configuration): void { - if (is_array($configuration)) { - $configuration = json_decode(json_encode($configuration), true); - } - if (empty($this->getName())) { + if ($configuration && empty($this->getName())) { $this->setName($configuration['configuration']['general']['name'] ?? null); } + $this->configuration = $configuration; }