notice: Undefined index: type....
litwol - March 9, 2008 - 04:54
| Project: | Zen |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
array index is being accessed without being verified if it even exist.
i apologize to mark this RTBC but i ahve a feeling setting it to 'code needs review' wont be enough. patch is small enough to go straight for RTBC.
thanks.
| Attachment | Size |
|---|---|
| template-menus.php_.patch | 671 bytes |

#1
A full error message would have been useful. Especially since I've never seen a warning message appear from within template-menus.php.
Also, I have a feeling this might only show up occasionally, under what circumstances do you experience this warning notice?
#2
i hate to come off as a smart ass, but i experience this warning when type is index is being access withut being set.
#3
Oleg, on what page or under what circumstances is
$link['type']not set?The patch does look RTBC, but I need to reproduce the bug in order to verify the patch fixes the bug.
#4
unfortunately this has been too long ago and i do not recall the circumstances.
#5
I think this might hint at a bug in the Drupal 6 menu system, but I can’t verify the bug, so perhaps it's been fixed.
#6
if you are implying that $link['type'] must _always_ be set in drupal core... if so then yes. otherwise this is not a drupal bug and a check should be made if array key exists before accessing it...
#7
You know what, I think this is a dupe of #207321: Zen 6.x: PHP Notice in template-menus.php on pages with tabs
Which was a bug in Drupal 6 before 6.0-rc3.