Drupal: 6.19
Shared Host: Hostmonster
Linux: (version unknown) Kernel version 2.6.28-10.46.intel.IGB.BHsmp
PHP: 5.2.14
MySQL version: 5.1.47-community-log
Apache version: 2.2.16

After activating this module, the following warning message appears on top of every page:

warning: Illegal offset type in isset or empty in /home7/ ... /public_html/ ... /includes/common.inc on line 916.

Everything seems to work fine on the site. However the message is persistent across all pages and it even shows up for other authenticated users. I have applied permissions to roles, set menu access rules, set rules to one particular menu, cleared caches, etc.

Moreover, a restricted role with 'Administer Menus' permission can edit a page and put it under a restricted menu not authorized under this role. My hope for this module was to allow restricted users to add their own pages but list them only under their own menus.

Any help (to at least remove the warning message) will be greatly appreciated.

Alan.

Comments

Syg’s picture

Menu access overrides the menu_get_menus() drupal function in menu_access.module.
In menu_item_access.module it calls menu_access_get_menus() instead.

Using menu_get_menus() will delete the error message but i dont know the drawbacks yet.

I tried to call both functions in "Execute Php Code" menu (devel module), the results are quite identical.

Array // with menu_get_menus()
(
    [devel] => Development
    [menu-enac-categories] => ENAC Categories // my personnal menu
    [features] => Features
    [navigation] => Navigation
    [primary-links] => Primary links
    [secondary-links] => Secondary links
)
Array // with menu_access_get_menus()
(
    [devel] => Development
    [menu-enac-categories] => ENAC Categories // my personnal menu
    [features] => Features
    [navigation] => Navigation
    [primary-links] => Primary links
    [secondary-links] => Secondary links
)
henrijs.seso’s picture

Same problem here. Exactly what code did you change and did you find any drawbacks? Since this is sort of security module, maintainer attention is needed.

emptyvoid’s picture

Assigned: Unassigned » emptyvoid

Actually the output may be the same but the menu_access_get_menu method validates access to see the menus before returning the array of menus.

I will need to review the menu array and see if it has changes since D6.3 (with the module was built).

emptyvoid’s picture

Also what you are describing may also include this bug too: http://drupal.org/node/618828

Where listing menu items should hide menus you are not allowed to see.