menu_attributes.api.php contains a function which documents how to implement a hook. It has a few errors:

(1) there should not be any argument
(2) $info should be returned at the end

Implementing it as is causes an exception and the site to crash.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alberto56’s picture

Status: Active » Needs review
FileSize
648 bytes

Here is a patch that fixes this.

pianomansam’s picture

Status: Needs review » Reviewed & tested by the community

Patch corrects the api documentation properly.

amateescu’s picture

Component: Code » Documentation
Status: Reviewed & tested by the community » Fixed

Actually, that function was trying to provide examples for two hooks at once: hook_menu_attribute_info() and hook_menu_attribute_info_alter().

Committed a fix to 7.x-1.x, 6.x-2.x and 6.x-1.x. Thanks for spotting the mistake.

Status: Fixed » Closed (fixed)

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