[buddypress-trac] [BuddyPress Trac] #6085: Possible Bug - Notice of Undefined index: position in bp-core-template.php

buddypress-trac noreply at wordpress.org
Fri Jan 2 14:22:10 UTC 2015


#6085: Possible Bug - Notice of Undefined index: position in bp-core-template.php
-------------------------------+------------------------------
 Reporter:  espellcaste        |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Core               |     Version:  2.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  2nd-opinion => reporter-feedback


Comment:

 Hi espellcaste. Happy new year!

 I can't reproduce this using only the code you've provided here. The nav
 arrays will only be sorted using `_bp_nav_menu_sort()` if they contain two
 or more items (http://php.net/manual/en/array.sorting.php#112221). What
 are the nav items that you've got under `$bp->bp_options_nav['profile']`?

 Have you checked whether this happens when using
 `bp_core_remove_subnav_item()`?

 `_bp_nav_menu_sort()` is called from two different places in
 `bp_get_nav_menu_items()` - once for top-level items, and once for each
 set of submenus. Can you examine a bit more to see where it's happening in
 your case, and let us know exactly what value is being passed to
 `usort()`?

 (I'm not necessarily opposed to the fix you've suggested, but I want to
 make sure this is not a symptom of a larger problem.)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6085#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list