[buddypress-trac] [BuddyPress Trac] #8005: Reset() expects parameter 1 to be and array, boolean given - buddypress/bp-core/bp-core-template.php 3038

buddypress-trac noreply at wordpress.org
Sat Feb 2 15:39:40 UTC 2019


#8005: Reset() expects parameter 1 to be and array, boolean given - buddypress/bp-
core/bp-core-template.php 3038
--------------------------------------+--------------------------
 Reporter:  Venutius                  |       Owner:  espellcaste
     Type:  defect (bug)              |      Status:  accepted
 Priority:  normal                    |   Milestone:  5.0.0
Component:  Navigation                |     Version:  3.0.0
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |
--------------------------------------+--------------------------

Comment (by imath):

 Hi @espellcaste

 I think I’d do something like this :

 {{{
 $primary_nav_item = (array) $bp->members->nav->get_primary( array( 'slug'
 => $component_id ), false );
 $primary_nav_item = reset( $primary_nav_item );
 }}}

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


More information about the buddypress-trac mailing list