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.

#1 1894772-1-menu_attributes-hook-api-wrong.patch648 bytesalberto56
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


alberto56’s picture

Status: Active » Needs review
648 bytes
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es). View

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.