From: jmg324 Date: Tue, 6 Nov 2007 15:56:00 +0000 (+0000) Subject: fixes notice error caused in form validation of file attachments - need not assume... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bec52f19b5f8d3389b2925d320193a89f59e3674;p=moodle.git fixes notice error caused in form validation of file attachments - need not assume variable is set but use empty() --- diff --git a/lib/formslib.php b/lib/formslib.php index e8a447c695..743cf3dfd6 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -214,7 +214,7 @@ class moodleform { } $errors[$elname] = $this->_upload_manager->files[$elname]['uploadlog']; - } else if ($this->_upload_manager->files[$elname]['clear']) { + } else if (!empty($this->_upload_manager->files[$elname]['clear'])) { $files[$elname] = $this->_upload_manager->files[$elname]['tmp_name']; } } else {