mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX php notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52930 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e98210ff28
commit
1e93305699
@ -204,6 +204,8 @@ class FileField extends FormField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function validate($validator) {
|
public function validate($validator) {
|
||||||
|
if(!isset($_FILES[$this->name])) return true;
|
||||||
|
|
||||||
$tmpFile = $_FILES[$this->name];
|
$tmpFile = $_FILES[$this->name];
|
||||||
$this->upload->setAllowedExtensions($this->allowedExtensions);
|
$this->upload->setAllowedExtensions($this->allowedExtensions);
|
||||||
$this->upload->setAllowedMaxFileSize($this->allowedMaxFileSize);
|
$this->upload->setAllowedMaxFileSize($this->allowedMaxFileSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user