diff --git a/.idea/php.xml b/.idea/php.xml index db05e2b..b285d9d 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -41,6 +41,7 @@ + diff --git a/.idea/simple-php-router.iml b/.idea/simple-php-router.iml index 2c4d89b..e5bc18a 100644 --- a/.idea/simple-php-router.iml +++ b/.idea/simple-php-router.iml @@ -40,6 +40,7 @@ + diff --git a/src/Pecee/Http/Input/InputHandler.php b/src/Pecee/Http/Input/InputHandler.php index 567a916..f05bf10 100644 --- a/src/Pecee/Http/Input/InputHandler.php +++ b/src/Pecee/Http/Input/InputHandler.php @@ -298,17 +298,13 @@ class InputHandler // Append POST data $output += $_POST; + $contents = file_get_contents('php://input'); - if (\in_array($this->request->getMethod(), ['put', 'patch', 'delete'], false) === true) { - - $contents = file_get_contents('php://input'); - - // Append any PHP-input json - if (strpos(trim($contents), '{') === 0) { - $post = json_decode($contents, true); - if ($post !== false) { - $output += $post; - } + // Append any PHP-input json + if (strpos(trim($contents), '{') === 0) { + $post = json_decode($contents, true); + if ($post !== false) { + $output += $post; } } }