From f7af53a9af7438ee73c330f03382de90120aef51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Tue, 19 Apr 2016 14:48:26 +0200 Subject: [PATCH] - Optimized Input class to ensure that InputFile items are always returned as object as they contain no value. --- src/Pecee/Http/Input/Input.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Pecee/Http/Input/Input.php b/src/Pecee/Http/Input/Input.php index 4f0f7af..e0fafaa 100644 --- a/src/Pecee/Http/Input/Input.php +++ b/src/Pecee/Http/Input/Input.php @@ -87,6 +87,10 @@ class Input { if($item !== null) { + if($item instanceof InputFile) { + return $item; + } + if (is_array($item->getValue())) { return ($key !== null && isset($item->getValue()[$key])) ? $item->getValue()[$key] : $item->getValue(); }