From: Thomas Tanghus Date: Wed, 2 Oct 2013 23:43:33 +0000 (+0200) Subject: Fix POST decoding X-Git-Tag: v6.0.0alpha2~93^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8a018d7a59047ef45bfa71b4f07db11a504085b8;p=nextcloud-server.git Fix POST decoding --- diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index b6832735fac..b45ac2f0097 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -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(