]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix POST decoding
authorThomas Tanghus <thomas@tanghus.net>
Wed, 2 Oct 2013 23:43:33 +0000 (01:43 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Wed, 2 Oct 2013 23:43:33 +0000 (01:43 +0200)
lib/private/appframework/http/request.php

index b6832735fac8428a86ae5c7be5e0687ab6eaf276..b45ac2f009737123a3df644c6fe0737b4a50850e 100644 (file)
@@ -70,8 +70,8 @@ class Request implements \ArrayAccess, \Countable, IRequest {
                // transformed by PHP, 'application/json' must be decoded manually.
                if ($this->method === 'POST'
                        && strpos($this->getHeader('Content-Type'), 'application/json') !== false
-                       && is_string($this->items['post'])) {
-                       $this->items['params'] = $this->items['post'] = json_decode($this->items['post'], true);
+               ) {
+                       $this->items['params'] = $this->items['post'] = json_decode(file_get_contents('php://input'), true);
                }
 
                $this->items['parameters'] = array_merge(