Merge pull request #96 from skipperbent/development

Development
This commit is contained in:
Simon Sessingø
2016-04-20 08:10:18 +02:00
+7 -1
View File
@@ -55,6 +55,8 @@ class Input {
return $element; return $element;
} }
if(request()->getMethod() !== 'get') {
$element = $this->post->findFirst($index); $element = $this->post->findFirst($index);
if ($element !== null) { if ($element !== null) {
@@ -62,10 +64,10 @@ class Input {
} }
$element = $this->file->findFirst($index); $element = $this->file->findFirst($index);
if ($element !== null) { if ($element !== null) {
return $element; return $element;
} }
}
return $default; return $default;
} }
@@ -85,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();
} }