From 1e93305699ce01f38d12b9b9298ee86910172ac0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 17 Apr 2008 10:11:40 +0000 Subject: [PATCH] BUGFIX php notice git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52930 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/FileField.php | 2 ++ 1 file changed, 2 insertions(+) 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);