#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 |
|---|---|---|---|
| Priority: | high | Milestone: | 10.7.0 |
| Component: | Core | Version: | 2.2 |
| Severity: | normal | 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.
4 years ago
#1
- Keywords has-patch added
#2
@
4 years ago
- Description modified (diff)
- Summary PHP 8.1 fatal / PHP <8 notice: Trying to get property 'ancestors' of non-object → 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
@
4 years ago
- Keywords commit added
- Milestone Awaiting Review → 10.7.0
- Priority normal → high
- Version → 2.2
Hi @dd32
Thanks a lot for your report & patch 🤝. I'll commit it asap.
This ticket was mentioned in Slack in #meta by dd32. View the logs.
4 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This merges in https://core.trac.wordpress.org/changeset/30157
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8760