diff --git a/core/includes/form.inc b/core/includes/form.inc index c605237..8bcc8aa 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -1940,7 +1940,7 @@ function form_builder($form_id, &$element, &$form_state) { // after normal input parsing has been completed. if (isset($element['#after_build']) && !isset($element['#after_build_done'])) { foreach ($element['#after_build'] as $callable) { - $element = call_user_func_array($callable, array($element, $form_state)); + $element = call_user_func_array($callable, array($element, &$form_state)); } $element['#after_build_done'] = TRUE; } diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index ec4276b..bfeb61d 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -282,8 +282,8 @@ function hook_queue_info_alter(&$queues) { * - "#validate": array of callback functions taking $form and $form_state. * - "#element_validate": array of callback functions taking $element and * $form_state. - * - "#pre_render": array of callables taking $element and $form_state. - * - "#post_render": array of callback functions taking $element and $form_state. + * - "#pre_render": array of callables taking $element. + * - "#post_render": array of callback functions taking $children and $element. * - "#submit": array of callback functions taking $form and $form_state. * - "#title_display": optional string indicating if and how #title should be * displayed, see theme_form_element() and theme_form_element_label().