Closed (fixed)
Project:
Deadwood
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
21 Jan 2009 at 14:38 UTC
Updated:
8 Mar 2009 at 16:10 UTC
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
Comment #1
solotandem commentedGood 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);