Unneeded hook_menu_alter?
cYu - February 17, 2009 - 18:42
| Project: | Mass Contact |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This hook appears unneeded and also throws notices when the menu is rebuilt on my site.
<?php
function mass_contact_menu_alter(&$callbacks) {
$callbacks['node/add/mass-contact']['access callback'] = FALSE;
}
?>If this does have a use case, can the code at least be changed to...
<?php
function mass_contact_menu_alter(&$callbacks) {
if (!empty($callbacks['node/add/mass-contact'])) {
$callbacks['node/add/mass-contact']['access callback'] = FALSE;
}
}
?>
#1
While I'm not seeing that behavior myself, I have no problem adding in an extra safety net.
#2
I applied the changes to the dev branch here: http://drupal.org/cvs?commit=182240
#3
Automatically closed -- issue fixed for 2 weeks with no activity.