hook_form conflicts with search module

18 points

I've got a custom module which implements hook_form(&$node, $state). The search module is installed and running, and after installing the custom module, I get an error message on ever page load that reads:

warning: Parameter 1 to custom_form() expected to be a reference, value given in [path]\includes\theme.inc on line 623.

I did some digging and found that the custom_form() is being called with an argument containing search_theme_form, an array which defines the search bar.

Why is this calling a hook from my custom module and not the search module? How can I set those associations straight?

cmorriss@brafton

Created by Anonymous 21 weeks 3 days ago
  Tags:

Answer(s):

Post your Answer

  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Links to specified hosts will have a rel="nofollow" added to them.

More information about formatting options