Skip to content

Commit

Permalink
Use str_ends_with function over strpos to fix false notice
Browse files Browse the repository at this point in the history
  • Loading branch information
pradpnayak committed Feb 14, 2025
1 parent eaee170 commit 1554399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webform_civicrm.module
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function webform_civicrm_civicrm_buildForm($formName, $form) {
}
$elements = $webform->getElementsDecodedAndFlattened();
foreach (array_keys($elements) as $element_form_key) {
if (strpos($element_form_key, "custom_$fid") !== FALSE) {
if (str_ends_with($element_form_key, "custom_$fid") !== FALSE) {
$nodes[] = $webform->toLink()->toString();
}
}
Expand Down

0 comments on commit 1554399

Please sign in to comment.