mirror of
https://github.com/filegator/filegator.git
synced 2025-07-31 04:40:12 +02:00
refactoring
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user