diff --git a/forms/FileField.php b/forms/FileField.php index d2df56385..b966d76d1 100755 --- a/forms/FileField.php +++ b/forms/FileField.php @@ -204,6 +204,8 @@ class FileField extends FormField { } public function validate($validator) { + if(!isset($_FILES[$this->name])) return true; + $tmpFile = $_FILES[$this->name]; $this->upload->setAllowedExtensions($this->allowedExtensions); $this->upload->setAllowedMaxFileSize($this->allowedMaxFileSize);