Fixed Input::all when php://input is not availible

This commit is contained in:
Simon Sessingo
2018-01-14 15:53:44 +01:00
parent 71518431a9
commit fc2e2e1e82
+2 -2
View File
@@ -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;
}
}
}