Skip to content
Snippets Groups Projects
Commit f350158f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #531038 by quicksketch: #value_callback missing drupal_function_exists().

parent 7d41b2d7
No related branches found
No related tags found
No related merge requests found
......@@ -1093,7 +1093,7 @@ function _form_builder_handle_input_element($form_id, &$element, &$form_state) {
// If we have input for the current element, assign it to the #value property.
if (!$form_state['programmed'] || isset($input)) {
// Call #type_value to set the form value;
if (function_exists($value_callback)) {
if (drupal_function_exists($value_callback)) {
$element['#value'] = $value_callback($element, $input, $form_state);
}
if (!isset($element['#value']) && isset($input)) {
......@@ -1108,7 +1108,7 @@ function _form_builder_handle_input_element($form_id, &$element, &$form_state) {
// Load defaults.
if (!isset($element['#value'])) {
// Call #type_value without a second argument to request default_value handling.
if (function_exists($value_callback)) {
if (drupal_function_exists($value_callback)) {
$element['#value'] = $value_callback($element);
}
// Final catch. If we haven't set a value yet, use the explicit default value.
......
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