From b2903485c0b63f80a6927507ee650fdaae47e999 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 6 May 2015 14:23:24 +0200 Subject: Use existing IRequest to not read php://input multiple times Fixes https://github.com/owncloud/client/issues/3204#issuecomment-99427563 - the firewall app has instantiiated an IRequest before and thus broke a lot of stuff on < PHP 5.6. --- lib/private/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/api.php b/lib/private/api.php index c58d2620684..3cdafe9af11 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -86,9 +86,9 @@ class OC_API { public static function call($parameters) { // Prepare the request variables if($_SERVER['REQUEST_METHOD'] == 'PUT') { - parse_str(file_get_contents("php://input"), $parameters['_put']); + $parameters['_put'] = \OC::$server->getRequest()->getParams(); } else if($_SERVER['REQUEST_METHOD'] == 'DELETE') { - parse_str(file_get_contents("php://input"), $parameters['_delete']); + $parameters['_delete'] = \OC::$server->getRequest()->getParams(); } $name = $parameters['_route']; // Foreach registered action -- cgit v1.2.3