From 2a2b21978f7664b5eee82f4232e2ee5a2101c6ea Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Tue, 13 Jun 2023 13:23:20 -0400 Subject: [PATCH] ISTWCMS-5551: fixing undefined index error --- uw_ct_service.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uw_ct_service.module b/uw_ct_service.module index 8825c98..f65299a 100644 --- a/uw_ct_service.module +++ b/uw_ct_service.module @@ -100,7 +100,7 @@ function uw_ct_service_form_node_uw_ct_service_form_alter(array &$form, FormStat unset($form['field_uw_service_hours']['widget']['office_hours']['value']['#header']['comment']); // Step through each of the regular days and remove the comments. - foreach ($form['field_uw_service_hours']['widget']['office_hours']['value'] as $index => $value) { + foreach ($form['field_uw_service_hours']['widget']['office_hours'][0]['value'] as $index => $value) { if (is_int($index)) { $form['field_uw_service_hours']['widget']['office_hours']['value'][$index]['#field_settings']['comment'] = 0; } -- GitLab