diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-04-23 07:50:28 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-04-23 07:50:28 +0000 |
commit | b1026a1a21f689cafedc0408a3174edb61f85ee2 (patch) | |
tree | a0c8efad301621f6c47d179b2aff82c85a33f072 /includes/form.inc | |
parent | 57fe6927a05c565ac5e2b61dcf9fe82da6614872 (diff) | |
download | brdo-b1026a1a21f689cafedc0408a3174edb61f85ee2.tar.gz brdo-b1026a1a21f689cafedc0408a3174edb61f85ee2.tar.bz2 |
#776178 follow-up by David_Rothstein: Fixed PHP 5.3 warning for command line install at the root, rather than the symptom.
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index fcadc3c36..4b8972a01 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -459,7 +459,20 @@ function form_state_keys_no_cache() { * Any additional arguments are passed on to the functions called by * drupal_form_submit(), including the unique form constructor function. * For example, the node_edit form requires that a node object be passed - * in here when it is called. + * in here when it is called. Arguments that need to be passed by reference + * should not be included here, but rather placed directly in the $form_state + * build info array so that the reference can be preserved. For example, a + * form builder function with the following signature: + * @code + * function mymodule_form($form, &$form_state, &$object) { + * } + * @endcode + * would be called via drupal_form_submit() as follows: + * @code + * $form_state['values'] = $my_form_values; + * $form_state['build_info']['args'] = array(&$object); + * drupal_form_submit('mymodule_form', $form_state); + * @endcode * For example: * @code * // register a new user |