mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed array to string conversion caused by patch committed in r73272
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@73298 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e9217a7c1d
commit
b5302a0f9d
@ -92,8 +92,16 @@ class Director {
|
||||
static function direct($url) {
|
||||
// Validate $_FILES array before merging it with $_POST
|
||||
foreach($_FILES as $k => $v) {
|
||||
if($v['tmp_name'] && !is_uploaded_file($v['tmp_name'])) {
|
||||
user_error("File upoad '$k' doesn't appear to be a valid upload", E_USER_ERROR);
|
||||
if(is_array($v['tmp_name'])) {
|
||||
foreach($v['tmp_name'] as $tmpFile) {
|
||||
if($tmpFile && !is_uploaded_file($tmpFile)) {
|
||||
user_error("File upload '$k' doesn't appear to be a valid upload", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if($v['tmp_name'] && !is_uploaded_file($v['tmp_name'])) {
|
||||
user_error("File upload '$k' doesn't appear to be a valid upload", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user