Perhaps I'm crazy, but doesn't every form generating function need to have $form, &$form_state as the arguments?

When going to admin/config/modules/install I receive the following error:

Warning: Parameter 1 to update_manager_install_form() expected to be a reference, value given in drupal_retrieve_form() (line 496 of includes/form.inc).

The current definition is:

function update_manager_install_form(&$form_state) {

But it needs to be fixed to be:

function update_manager_install_form($form, &$form_state) {

Comments

johnalbin’s picture

Status: Active » Needs review
StatusFileSize
new969 bytes

This patch fixes the bug and adds the missing docblock for this function.

dww’s picture

Issue tags: +Update manager
StatusFileSize
new1.11 KB

That's very strange -- I wonder why I don't see those errors. But yeah, that looks like a good fix. However, while we're changing this, we should also fix the fact that when this form builder is invoked from the menu system, we also pass in a 3rd argument, $context. Added that to the function signature and PHPDoc.

Thanks, John!

p.s. We're tagging all Update-manager-related issues with "Update manager" so we can track them all together -- even though most are in update.module component, some are spread around in other places, so the tag is helpful.

chx’s picture

Status: Needs review » Reviewed & tested by the community

That's a good one.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Update manager

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