mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX #6219 Director::direct() validation fails for doubly nested file fields (thanks ajshort!) (from r114921)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114922 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c00e5a384b
commit
521a76b880
@ -93,7 +93,8 @@ class Director {
|
||||
// Validate $_FILES array before merging it with $_POST
|
||||
foreach($_FILES as $k => $v) {
|
||||
if(is_array($v['tmp_name'])) {
|
||||
foreach($v['tmp_name'] as $tmpFile) {
|
||||
$v = ArrayLib::array_values_recursive($v['tmp_name']);
|
||||
foreach($v as $tmpFile) {
|
||||
if($tmpFile && !is_uploaded_file($tmpFile)) {
|
||||
user_error("File upload '$k' doesn't appear to be a valid upload", E_USER_ERROR);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user