In drupal_retrieve_form() the forms are statically cached:

  $forms = &drupal_static(__FUNCTION__);</cache>

but the hook_forms gets $args passed which vary by form:
<code>$forms = module_invoke_all('forms', $form_id, $args);

Thus that can't work right.

Comments

fago’s picture

sry for that broken post, I should use 'preview'.. ;)

fixed it:

In drupal_retrieve_form() the forms are statically cached:
$forms = &drupal_static(__FUNCTION__);

but the hook_forms gets $args passed which vary by form:
$forms = module_invoke_all('forms', $form_id, $args);

Thus that can't work right.

fago’s picture

Status: Active » Closed (fixed)

ok it can work due to: !isset($forms[$form_id]

Confusing pattern though.

sun’s picture