From fc2e2e1e82fff0f04e526eaf3e280cf9569f7ab1 Mon Sep 17 00:00:00 2001 From: Simon Sessingo Date: Sun, 14 Jan 2018 15:53:44 +0100 Subject: [PATCH] Fixed Input::all when php://input is not availible --- src/Pecee/Http/Input/Input.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pecee/Http/Input/Input.php b/src/Pecee/Http/Input/Input.php index 38719b2..5bfd8ab 100644 --- a/src/Pecee/Http/Input/Input.php +++ b/src/Pecee/Http/Input/Input.php @@ -254,7 +254,7 @@ class Input */ public function all(array $filter = null) { - $output = $_GET; + $output = $_GET + $_POST; if ($this->request->getMethod() === 'post') { @@ -263,7 +263,7 @@ class Input if (strpos(trim($contents), '{') === 0) { $post = json_decode($contents, true); if ($post !== false) { - $output = array_merge($output, $post); + $output += $post; } } }