make getDataJson return array also for single values

This commit is contained in:
Dennis Eichhorn 2023-09-19 17:13:05 +00:00
parent 11d2ed8f2e
commit 9843328a14

View File

@ -238,7 +238,11 @@ abstract class RequestAbstract implements MessageInterface
$json = \json_decode($this->data[$key], true); /** @phpstan-ignore-line */ $json = \json_decode($this->data[$key], true); /** @phpstan-ignore-line */
return \is_array($json) ? $json : []; if ($json === null) {
$json = $this->data[$key];
}
return \is_array($json) ? $json : [$json];
} }
/** /**