Skip to content

Commit

Permalink
Merge pull request #866 from UN-OCHA/berliner/HPC-9312
Browse files Browse the repository at this point in the history
HPC-9312: Prevent warnings by not adding NULL classes to form elements
  • Loading branch information
berliner authored Dec 7, 2023
2 parents 4c9bfc4 + 89dbb80 commit 6a6512e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public static function processEntityAttachmentSelect(array &$element, FormStateI
'wrapper' => $wrapper_id,
],
'#attributes' => [
'class' => [$current_action != 'select_entities' ? 'visually-hidden' : NULL],
'class' => $current_action != 'select_entities' ? ['visually-hidden'] : [],
],
];
$element['actions']['change_entities'] = [
Expand All @@ -204,7 +204,7 @@ public static function processEntityAttachmentSelect(array &$element, FormStateI
'wrapper' => $wrapper_id,
],
'#attributes' => [
'class' => [$current_action != 'select_attachments' ? 'visually-hidden' : NULL],
'class' => $current_action != 'select_attachments' ? ['visually-hidden'] : [],
],
'#limit_validation_errors' => [],
'#submit' => [],
Expand All @@ -218,7 +218,7 @@ public static function processEntityAttachmentSelect(array &$element, FormStateI
'wrapper' => $wrapper_id,
],
'#attributes' => [
'class' => [$current_action != 'select_attachments' ? 'visually-hidden' : NULL],
'class' => $current_action != 'select_attachments' ? ['visually-hidden'] : [],
],
];
if (!empty($element['#next_step']) && !empty($element['#container_wrapper'])) {
Expand Down

0 comments on commit 6a6512e

Please sign in to comment.