Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for "navID" being set in bic_navhelper_get_max_nav_id #32

Closed
jensschuppe opened this issue May 9, 2018 · 3 comments
Closed

Check for "navID" being set in bic_navhelper_get_max_nav_id #32

jensschuppe opened this issue May 9, 2018 · 3 comments
Labels
Milestone

Comments

@jensschuppe
Copy link

PHP notices "Undefined index: navID in bic_navhelper_get_max_nav_id" are being thrown while crawling the menu tree for finding the maximum navID for items in the navigation menu tree when there are menu items without a navID set.

Not sure whether this stems from incorrect implementations in other extensions (i.e. them not setting a "navID" attribute for a menu item), but it's quite annoying when this happens.

There should be a check for whether the "navID" attribute exists in bic_navhelper_get_max_nav_id within $max_id = max($max_id, $entry['attributes']['navID']);, e.g. $max_id = (isset($entry['attributes']['navID']) ? max($max_id, $entry['attributes']['navID']) : 0);.

@bjendres
Copy link
Member

bjendres commented May 9, 2018

PRs welcome :)

@kainuk
Copy link
Contributor

kainuk commented May 30, 2018

PR #33

jaapjansma added a commit that referenced this issue May 30, 2018
#32 Fix use civix generated functions
@bjendres
Copy link
Member

Thanks, seems to work, released with 1.3.beta1

@bjendres bjendres added this to the 1.3 milestone Nov 13, 2018
@bjendres bjendres added the bug label Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants