refactoring

This commit is contained in:
Milos Stojanovic
2019-06-14 12:46:45 +02:00
parent 667389ab1a
commit f6185c92ab
14 changed files with 1019 additions and 34 deletions

View File

@@ -21,7 +21,7 @@ class Request extends SymfonyRequest
// then look into JSON content, fallback to default
if ($value === null) {
$content = json_decode($this->getContent());
$content = json_decode((string) $this->getContent());
$value = isset($content->{$key}) ? $content->{$key} : $default;
}
@@ -33,7 +33,7 @@ class Request extends SymfonyRequest
$params = [];
// first look into JSON content
$content = json_decode($this->getContent());
$content = json_decode((string) $this->getContent());
if (! empty($content)) {
foreach ($content as $key => $param) {
$params[$key] = $param;