MINOR: Fixed FileField->Value() erroring when files value not set.

This commit is contained in:
ajshort 2011-12-26 19:08:08 +11:00
parent 3478e4f9e6
commit d692c22ee4

View File

@ -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
*