I'm including nice menus with a line like this in the page.tpl.php
print theme('nice_menus_primary_links');
However, the menu is empty for anonymous users and in these cases it was showing an error:
Undefined index: content in theme_nice_menus_primary_links() (line 554 of
nice_menus/nice_menus.module)
The attached patch corrects this.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1193610-error_with_empty_menu.patch | 1.2 KB | amateescu |
| empty_menu_error.patch | 673 bytes | drasgardian |
Comments
Comment #1
amateescu commentedLooks good to me. I also added an empty 'subject' key in the attached patch and moved the declaration to the beginning of the function for code clarity.
Comment #2
vordude commentedgood catch fixed with 8ab48cb8c3123