Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Fixed "Empty validation message for file input when sent array for file input #184" #185

Merged
merged 8 commits into from
Aug 28, 2019
Merged
Prev Previous commit
Next Next commit
Update HttpServerFileInputDecorator.php
  • Loading branch information
ruzann authored Jul 21, 2019
commit 3f2028d85f3951b46a45e4ac1f208d3c8b65e01e
2 changes: 1 addition & 1 deletion src/FileInput/HttpServerFileInputDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function isValid($context = null)
'type' => '',
'error' => UPLOAD_ERR_NO_FILE,
];
} elseif(!isset($rawValue['tmp_name']) || !isset($rawValue[0]['tmp_name'])) {
} elseif(!isset($rawValue['tmp_name']) && !isset($rawValue[0]['tmp_name'])) {
// This can happen when sent not file and just array
$rawValue = [
'tmp_name' => '',
Expand Down