Commit 542d69fb authored by webchick's avatar webchick

#547846 by David_Rothstein: Fixed a missing reference operator that caused...

#547846 by David_Rothstein: Fixed a missing reference operator that caused Drupal installation to fail on PHP 5.3.
parent 5028d5fb
...@@ -442,6 +442,9 @@ function drupal_retrieve_form($form_id, &$form_state) { ...@@ -442,6 +442,9 @@ function drupal_retrieve_form($form_id, &$form_state) {
} }
} }
// We need to pass $form_state by reference in order for forms to modify it,
// since call_user_func_array() requires that referenced variables be passed
// explicitly.
$args = array_merge(array(&$form_state), $args); $args = array_merge(array(&$form_state), $args);
// If $callback was returned by a hook_forms() implementation, call it. // If $callback was returned by a hook_forms() implementation, call it.
......
...@@ -386,7 +386,10 @@ function install_run_task($task, &$install_state) { ...@@ -386,7 +386,10 @@ function install_run_task($task, &$install_state) {
// redirect, since the installer handles its own redirection only after // redirect, since the installer handles its own redirection only after
// marking the form submission task complete. // marking the form submission task complete.
$form_state = array( $form_state = array(
'args' => array($install_state), // We need to pass $install_state by reference in order for forms to
// modify it, since the form API will use it in call_user_func_array(),
// which requires that referenced variables be passed explicitly.
'args' => array(&$install_state),
'no_redirect' => TRUE, 'no_redirect' => TRUE,
); );
$form = drupal_build_form($function, $form_state); $form = drupal_build_form($function, $form_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment