[buddypress-trac] [BuddyPress Trac] #8760: PHP 8.1 fatal / PHP <8 notice+warning: Trying to get property 'ancestors' of non-object

buddypress-trac noreply at wordpress.org
Wed Nov 9 04:26:57 UTC 2022


#8760: PHP 8.1 fatal / PHP <8 notice+warning: Trying to get property 'ancestors'
of non-object
------------------------------+---------------------
 Reporter:  dd32              |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  high              |   Milestone:  10.7.0
Component:  Core              |     Version:  2.2
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+---------------------

Comment (by imath):

 In [changeset:"13361" 13361]:
 {{{
 #!CommitTicketReference repository="" revision="13361"
 Check a BuddyPress page exists before trying to access its properties

 In `bp_core_menu_highlight_parent_page()` when trying to determine if the
 displayed page has a BuddyPress page ancestor, we need to make sure the
 potential BuddyPress page still exists to avoid a PHP notice/error.

 Props dd32

 Closes https://github.com/buddypress/buddypress/pull/35
 See #8760 (trunk)
 }}}

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


More information about the buddypress-trac mailing list