Skip to content
Snippets Groups Projects
Commit 6ec0561e authored by Angie Byron's avatar Angie Byron
Browse files

#994870 follow-up by eaton: Add missing element argument to machine name exists callback.

parent f6f3e2ba
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -3368,7 +3368,7 @@ function form_validate_machine_name(&$element, &$form_state) {
// Verify that the machine name is unique.
if ($element['#default_value'] !== $element['#value']) {
$function = $element['#machine_name']['exists'];
if ($function($element['#value'], $form_state)) {
if ($function($element['#value'], $element, $form_state)) {
form_error($element, t('The machine-readable name is already in use. It must be unique.'));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment