Skip to content

Commit

Permalink
Merge pull request #970 from Gaurav-gupta11/3447261-undefined-variabl…
Browse files Browse the repository at this point in the history
…e-key

Issue #3447261 : Undefined variable .
  • Loading branch information
jitendrapurohit authored May 25, 2024
2 parents 51893f3 + 5c4575c commit b70d48c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Element/CivicrmSelectOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit b70d48c

Please sign in to comment.