Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1894772-1-menu_attributes-hook-api-wrong.patch | 648 bytes | alberto56 |
Comments
Comment #1
alberto56 CreditAttribution: alberto56 commentedHere is a patch that fixes this.
Comment #2
pianomansam CreditAttribution: pianomansam commentedPatch corrects the api documentation properly.
Comment #3
amateescu CreditAttribution: amateescu commentedActually, that function was trying to provide examples for two hooks at once:
hook_menu_attribute_info()
andhook_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.