diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-07 14:19:41 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 15:51:13 +0200 |
commit | 9717cdfb9ed91db270564e2a2c364e78ba3c920e (patch) | |
tree | 75e5731357f15767df00fdeaaac4a658e448489f /lib | |
parent | 459ae6d94af6bd8c20ecb0ad09c6649764817ada (diff) | |
download | nextcloud-server-9717cdfb9ed91db270564e2a2c364e78ba3c920e.tar.gz nextcloud-server-9717cdfb9ed91db270564e2a2c364e78ba3c920e.zip |
If there is no content don't error
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 956744e5d5e..7e21434c734 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -432,7 +432,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { // 'application/json' must be decoded manually. if (strpos($this->getHeader('Content-Type'), 'application/json') !== false) { $params = json_decode(file_get_contents($this->inputStream), true); - if(count($params) > 0) { + if($params !== null && count($params) > 0) { $this->items['params'] = $params; if($this->method === 'POST') { $this->items['post'] = $params; |