Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Notice: Undefined variable: parent_depth in theme_nice_menus_tree() (line 399 of sites/all/modules/nice_menus/nice_menus.module).
The notice occurs when the in block settings for the nice menu the depth is set to anything higher than zero.
Looking at the code, it appears that $parent_depth is set on line 376, but that's inside an IF statement, so it's not always called.
Using PHP 5.2.17
Comment | File | Size | Author |
---|---|---|---|
#13 | nice_menus-theme_nice_menus_tree_Undefined_variable-1101722.patch | 1.19 KB | xiukun.zhou |
#5 | 1101722_nice_menus_undefined_var.diff | 548 bytes | dalin |
Comments
Comment #1
wvlgen CreditAttribution: wvlgen commentedI have the same problem, but -1 seems to do the jog.
Comment #2
wid CreditAttribution: wid commentedAdding parent_depth = 0 does the trick
Comment #3
vordude CreditAttribution: vordude commentedNo patch here yet, it looks like a small fix.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedSame here, it's PHP5.3+ issue.
Comment #5
dalinComment #6
hswong3i CreditAttribution: hswong3i commentedSubscribe. Patch from #5 works for me, thank you very much ;-)
Comment #7
Mark TrappSubscribe. Seconding RTBC for #5.
Comment #8
amateescu CreditAttribution: amateescu commentedThe patch from #5 looks good to me too.
Comment #9
nikkubhai CreditAttribution: nikkubhai commentedHave you commited the patch?
Comment #10
vordude CreditAttribution: vordude commentedcommitted with 3c8fdcd2799486c
Comment #12
sranith73 CreditAttribution: sranith73 commentedI added the patch provided. But still getting other error like below
Notice: Undefined variable: title in theme_nice_menus_tree() of nice_menus.module
I am using 7.x-2.5 version of nice menus.
Suggest me something to get rid of this error
Comment #13
xiukun.zhou CreditAttribution: xiukun.zhou commentedHi sranith73.
try patch
Comment #14
sranith73 CreditAttribution: sranith73 commentedThanks xiukun, Adding the patch worked for me
Comment #15
jenlamptonthis fix was committed, so closing the issue.