mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-12 01:42:12 +00:00
- Optimized Input class to ensure that InputFile items are always returned as object as they contain no value.
This commit is contained in:
@@ -87,6 +87,10 @@ class Input {
|
|||||||
|
|
||||||
if($item !== null) {
|
if($item !== null) {
|
||||||
|
|
||||||
|
if($item instanceof InputFile) {
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($item->getValue())) {
|
if (is_array($item->getValue())) {
|
||||||
return ($key !== null && isset($item->getValue()[$key])) ? $item->getValue()[$key] : $item->getValue();
|
return ($key !== null && isset($item->getValue()[$key])) ? $item->getValue()[$key] : $item->getValue();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user