From 36c166bb812d9ae4cc71176b068c5c6932acf97d Mon Sep 17 00:00:00 2001 From: Daniel Thies Date: Wed, 31 Jan 2024 08:58:51 -0600 Subject: [PATCH] MED-3: Edit form validation bug --- source/streamio/classes/form/edit_resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/streamio/classes/form/edit_resource.php b/source/streamio/classes/form/edit_resource.php index b6d6c82..30e27d0 100644 --- a/source/streamio/classes/form/edit_resource.php +++ b/source/streamio/classes/form/edit_resource.php @@ -139,7 +139,7 @@ public function definition_after_data() { public function validation($data, $files) { $errors = []; - if (empty($data['newfile']) && empty($data['file'])) { + if (empty($data['edit']) && empty($data['newfile']) && empty($data['file'])) { $errors['file'] = get_string('required'); }