#8760 closed defect (bug) (fixed)
PHP 8.1 fatal / PHP <8 notice+warning: Trying to get property 'ancestors' of non-object
Reported by: | dd32 | Owned by: | imath |
---|---|---|---|
Milestone: | 10.7.0 | Priority: | high |
Severity: | normal | Version: | 2.2 |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description (last modified by )
The current PHP Notice is being triggered on BuddyPress.org, and is a Fatal error in PHP 8.1:
E_NOTICE: Trying to get property 'ancestors' of non-object in {file} E_WARNING: in_array() expects parameter 2 to be array, null given in {file} PHP 8.1 Fatal error: Uncaught Error: in_array(): Argument #2 ($haystack) must be of type array, null given in {file} Source: GET https://buddypress.org/users/dd32/ File: wp-content/plugins/buddypress/bp-core/bp-core-filters.php Line: 202
See PR.
Change History (6)
This ticket was mentioned in PR #35 on buddypress/buddypress by @dd32.
23 months ago
#1
- Keywords has-patch added
#2
@
23 months ago
- Description modified (diff)
- Summary changed from PHP 8.1 fatal / PHP <8 notice: Trying to get property 'ancestors' of non-object to PHP 8.1 fatal / PHP <8 notice+warning: Trying to get property 'ancestors' of non-object
Just noting that this is a E_WARNING
in PHP <8 too, I just missed the fact that it's changed from E_NOTICE+E_WARNING
to E_NOTICE+E_ERROR
in the sea of notices I was looking at :)
#3
@
23 months ago
- Keywords commit added
- Milestone changed from Awaiting Review to 10.7.0
- Priority changed from normal to high
- Version set to 2.2
Hi @dd32
Thanks a lot for your report & patch 🤝. I'll commit it asap.
#5
@
23 months ago
- Owner set to imath
- Resolution set to fixed
- Status changed from new to closed
In 13362:
This ticket was mentioned in Slack in #meta by dd32. View the logs.
22 months ago
Note: See
TracTickets for help on using
tickets.
This merges in https://core.trac.wordpress.org/changeset/30157
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8760