From 1c929747ce3f15ce4c8e81f7760f3dd4d9f9a4bd Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 9 Apr 2008 11:13:24 +0000 Subject: [PATCH] Merged revisions 47623 via svnmerge from svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq ........ r47623 | ischommer | 2008-01-04 21:44:51 +1300 (Fri, 04 Jan 2008) | 1 line fixed extension checking ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52400 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- filesystem/Upload.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filesystem/Upload.php b/filesystem/Upload.php index b45643a0f..f010757da 100644 --- a/filesystem/Upload.php +++ b/filesystem/Upload.php @@ -162,6 +162,9 @@ class Upload extends Controller { * @return boolean */ public function validate($tmpFile) { + // we don't validate for empty upload fields yet + if(!isset($tmpFile['name']) || empty($tmpFile['name'])) return true; + $pathInfo = pathinfo($tmpFile['name']); // filesize validation if(!$this->isValidSize($tmpFile)) {