mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Fixed FileField->Value() erroring when files value not set.
This commit is contained in:
parent
3478e4f9e6
commit
d692c22ee4
@ -156,11 +156,11 @@ class FileField extends FormField {
|
||||
$record->{$this->name . 'ID'} = $file->ID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function Value() {
|
||||
return $_FILES[$this->getName()];
|
||||
return isset($_FILES[$this->getName()]) ? $_FILES[$this->getName()] : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get custom validator for this field
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user