From e49258f9589ae5ded74efb748e8483119d7256db Mon Sep 17 00:00:00 2001 From: Creative Dutchmen Date: Wed, 4 Aug 2010 19:52:26 +0800 Subject: [PATCH] Fixes bug #380. Removing a file now works as expected --- symphony/lib/toolkit/fields/field.upload.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/symphony/lib/toolkit/fields/field.upload.php b/symphony/lib/toolkit/fields/field.upload.php index c58908a2..7d0e81f6 100755 --- a/symphony/lib/toolkit/fields/field.upload.php +++ b/symphony/lib/toolkit/fields/field.upload.php @@ -373,6 +373,16 @@ public function processRawFieldData($data, &$status, $simulate=false, $entry_id= $status = self::__OK__; + //fixes bug where files are deleted, but their database entries are not. + if($data === NULL){ + return array( + 'file' => NULL, + 'mimetype' => NULL, + 'size' => NULL, + 'meta' => NULL + ); + } + ## Its not an array, so just retain the current data and return if(!is_array($data)){