From 5c4575c3598e0366be7beb66d6d5675639430b94 Mon Sep 17 00:00:00 2001 From: Gaurav Gupta Date: Tue, 21 May 2024 11:08:10 +0530 Subject: [PATCH] Issue #3447261 : Undefined variable . --- src/Element/CivicrmSelectOptions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Element/CivicrmSelectOptions.php b/src/Element/CivicrmSelectOptions.php index 0727187f5..b0fcfec68 100644 --- a/src/Element/CivicrmSelectOptions.php +++ b/src/Element/CivicrmSelectOptions.php @@ -104,7 +104,7 @@ public static function processSelectOptions(&$element, FormStateInterface $form_ $element['options']['#tabledrag'] = []; $element['options']['#tableselect'] = FALSE; } - if (strpos($element['#form_key'], 'address_state_province_id') !== false || strpos($key, 'address_county_id') !== false) { + if (strpos($element['#form_key'], 'address_state_province_id') !== false || strpos($element['#form_key'], 'address_county_id') !== false) { $parent_label = (strpos($element['#form_key'], 'address_state_province_id') !== false) ? 'Country' : 'State/Province'; $element['options']['#empty'] = t('Options are loaded dynamically on the webform based on the value selected in @key field.', ['@key' => $parent_label]); }