diff --git a/forms/FileField.php b/forms/FileField.php index 414ed7bb7..7b45a90d1 100644 --- a/forms/FileField.php +++ b/forms/FileField.php @@ -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 *