The API documentation of hook_node() lists the parameters &$node and &$param. $param? node_form() passes $form_values as the second argument to hook_form().

Even worse, the hook docs say to set that array to HTML attributes of the <form> tag because it was supposed to be passed as a reference. Thankfully, no module I know of actually does this because it would mess up their form horribly.

I think this is a holdover from http://drupal.org/node/35434.

Comments

Island Usurper’s picture

Component: Developer Guide » Documentation in CVS
bdragon’s picture

Status: Active » Postponed (maintainer needs more info)

Wait, hook_node()? Where are you seeing this? I don't think there's ever been a hook_node()... Well, other than the Data API wanting to rename nodeapi to node... http://drupal.org/node/113435

Island Usurper’s picture

Status: Postponed (maintainer needs more info) » Active

Neither have I, actually. What was I on that day?

I meant hook_form(). The documentation of hook_form() needs updating.

t-dub’s picture

Title: hook_node() parameters are misleading » hook_form() parameters are misleading

Changing the title so it reflects the correct hook :)

darren oh’s picture

Status: Active » Fixed

This documentation has not been updated since Drupal 4.6. Fixed in the following CVS commits:

Drupal 4.7
127685
Drupal 5
127686
Drupal 6
127688
HEAD
127687
Anonymous’s picture

Status: Fixed » Closed (fixed)

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