mirror of
https://github.com/getgrav/grav.git
synced 2026-02-04 13:50:13 +01:00
filterFile if the file field allows multiple items returns an array, otherwise a string
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user