[buddypress-trac] [BuddyPress Trac] #8005: PHP warning when getting BuddyPress page title part

buddypress-trac noreply at wordpress.org
Sat Feb 2 17:49:16 UTC 2019


#8005: PHP warning when getting  BuddyPress page title part
--------------------------------------+--------------------------
 Reporter:  Venutius                  |       Owner:  espellcaste
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.0.0
Component:  Navigation                |     Version:  3.0.0
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  good-first-bug has-patch  |
--------------------------------------+--------------------------
Changes (by espellcaste):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"12332" 12332]:
 {{{
 #!CommitTicketReference repository="" revision="12332"
 Casting the `$primary_nav_item` variable to an array when fetching the nav
 primary item to avoid PHP warning.

 The `get_primary` method returns `false` when there is no nav primary item
 assigned. The `false` value returned triggered PHP warning when trying to
 get the first value of the array with `reset`.

 Props imath, klawton

 Fixes #8005
 }}}

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


More information about the buddypress-trac mailing list