From bec52f19b5f8d3389b2925d320193a89f59e3674 Mon Sep 17 00:00:00 2001 From: jmg324 Date: Tue, 6 Nov 2007 15:56:00 +0000 Subject: [PATCH] fixes notice error caused in form validation of file attachments - need not assume variable is set but use empty() --- lib/formslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.39.5