mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed Filtering for files, always threat as multiple
This commit is contained in:
parent
6bd7641862
commit
f4b7e36763
|
|
@ -301,15 +301,7 @@ class Validation
|
|||
|
||||
protected static function filterFile($value, array $params, array $field)
|
||||
{
|
||||
if (isset($field['multiple']) && $field['multiple'] === true) {
|
||||
return (array) $value;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
return reset($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
return (array) $value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user