diff options
author | Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com> | 2022-12-19 09:07:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-19 09:07:38 +0100 |
commit | 7dcd6eb561f4bba7ed36ce1178c725278dd9b80e (patch) | |
tree | 8de1664f1a18df2e3b7b3dafadb3e0b6c3a8b439 /lib/private/AppFramework/Http | |
parent | ed902d58b62150a46c745b5e87c895fc3fc67509 (diff) | |
parent | e12aaa298861743f798d9adf644d626ac8e89a95 (diff) | |
download | nextcloud-server-7dcd6eb561f4bba7ed36ce1178c725278dd9b80e.tar.gz nextcloud-server-7dcd6eb561f4bba7ed36ce1178c725278dd9b80e.zip |
Merge branch 'master' into add-scim-json-support
Signed-off-by: Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>
Diffstat (limited to 'lib/private/AppFramework/Http')
-rw-r--r-- | lib/private/AppFramework/Http/Dispatcher.php | 2 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php index c1a203a7165..aaaf2ba6560 100644 --- a/lib/private/AppFramework/Http/Dispatcher.php +++ b/lib/private/AppFramework/Http/Dispatcher.php @@ -194,7 +194,7 @@ class Dispatcher { $arguments = []; // valid types that will be casted - $types = ['int', 'integer', 'bool', 'boolean', 'float']; + $types = ['int', 'integer', 'bool', 'boolean', 'float', 'double']; foreach ($this->reflector->getParameters() as $param => $default) { diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 3764ce5c7f8..9f66fd1d3ec 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -432,13 +432,12 @@ class Request implements \ArrayAccess, \Countable, IRequest { // 'application/json' and other JSON-related content types must be decoded manually. if (preg_match(self::JSON_CONTENT_TYPE_REGEX, $this->getHeader('Content-Type')) === 1) { $params = json_decode(file_get_contents($this->inputStream), true); - if ($params !== null && \count($params) > 0) { + if (\is_array($params) && \count($params) > 0) { $this->items['params'] = $params; if ($this->method === 'POST') { $this->items['post'] = $params; } } - // Handle application/x-www-form-urlencoded for methods other than GET // or post correctly } elseif ($this->method !== 'GET' |