From 6b8351f1b8ac9df229a0009cf6a1070a231136c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Tue, 19 Apr 2016 02:08:14 +0200 Subject: [PATCH] - Input class no longer tries to search for parameter in FILE or POST if it's not a postback. --- src/Pecee/Http/Input/Input.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Pecee/Http/Input/Input.php b/src/Pecee/Http/Input/Input.php index db45b00..4f0f7af 100644 --- a/src/Pecee/Http/Input/Input.php +++ b/src/Pecee/Http/Input/Input.php @@ -55,16 +55,18 @@ class Input { return $element; } - $element = $this->post->findFirst($index); + if(request()->getMethod() !== 'get') { - if($element !== null) { - return $element; - } + $element = $this->post->findFirst($index); - $element = $this->file->findFirst($index); + if ($element !== null) { + return $element; + } - if($element !== null) { - return $element; + $element = $this->file->findFirst($index); + if ($element !== null) { + return $element; + } } return $default;