Skip to content

Instantly share code, notes, and snippets.

@mecmartini
Last active November 18, 2021 16:31
Show Gist options
  • Save mecmartini/f8d8c98b5b61b889070bcf5e70603bad to your computer and use it in GitHub Desktop.
Save mecmartini/f8d8c98b5b61b889070bcf5e70603bad to your computer and use it in GitHub Desktop.
fix_oe_theme_preprocess_search_input_text
diff --git a/oe_theme.theme b/oe_theme.theme
index 2194d385..28cd20d6 100644
--- a/oe_theme.theme
+++ b/oe_theme.theme
@@ -1159,7 +1159,7 @@ function _oe_theme_preprocess_search_input_text(array $element): array {
// Process element attributes into an ECL input array.
$ecl_array = [
'id' => $element['#attributes']['id'],
- 'name' => $element['#attributes']['name'],
+ 'name' => isset($element['#attributes']['name']) ? $element['#attributes']['name'] : FALSE,
'disabled' => isset($element['#attributes']['disabled']) ? $element['#attributes']['disabled'] : FALSE,
'type' => $element['#attributes']['type'],
'class' => $element['#attributes']['class'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment