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.

Files: 
CommentFileSizeAuthor
#1 1894772-1-menu_attributes-hook-api-wrong.patch648 bytesalberto56
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es).
[ View ]

Comments

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

Here is a patch that fixes this.

Status:Needs review» Reviewed & tested by the community

Patch corrects the api documentation properly.

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.