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
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

oadaeh - March 11, 2009 - 21:47

While I'm not seeing that behavior myself, I have no problem adding in an extra safety net.

#2

oadaeh - March 12, 2009 - 00:32
Status:needs review» fixed

I applied the changes to the dev branch here: http://drupal.org/cvs?commit=182240

#3

System Message - March 26, 2009 - 00:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.