According to http://api.drupal.org/api/function/drupal_retrieve_form/5, the drupal_retrieve_form() function takes as parameters a $form_id and then:

... Any additional arguments needed by the form building function.

and according to http://api.drupal.org/api/function/drupal_retrieve_form, the drupal_retrieve_form() function takes as parameters a $form_id, a $form_state and then:

... Any additional arguments needed by the unique form constructor function.

Your conversion process does not take the additional arguments into account and simply adds the $form_state variable to the end of the parameters.

Comments

solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Fixed

Good catch.

The next dev snapshot (after today) converts as follows.

From:
$my_form = drupal_retrieve_form('my_form_id');
$my_form = drupal_retrieve_form('my_form_id', $a, $b, $c);

To:
/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
$my_form = drupal_retrieve_form('my_form_id', $form_state);
/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
$my_form = drupal_retrieve_form('my_form_id', $form_state, $a, $b, $c);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.