filterFile if the file field allows multiple items returns an array, otherwise a string

This commit is contained in:
Flavio Copes
2015-12-16 15:16:14 +01:00
parent 0e8e27877e
commit 451baff26e

View File

@@ -283,7 +283,11 @@ class Validation
protected static function filterFile($value, array $params, array $field)
{
return (array) $value;
if ($field['multiple'] == true) {
return (array) $value;
}
return reset($value);
}
/**