[wp-trac] [WordPress Trac] #52510: In PHP 8.0, non-posts/pages shows an warning error "Attempt to read property on null"
WordPress Trac
noreply at wordpress.org
Fri Feb 12 13:38:54 UTC 2021
#52510: In PHP 8.0, non-posts/pages shows an warning error "Attempt to read
property on null"
---------------------------+-----------------------------
Reporter: erwinbantilan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.6.1
Severity: minor | Keywords:
Focuses: |
---------------------------+-----------------------------
In PHP 8.0, when accessing the non-posts/pages like /data/feed and
/data/rss, it shows an PHP Warning error saying "Attempt to read property
"post_title" on null".
This fix added an isset check for the variable and immediately return
false value.
I have a pull request on your mirror github page, which shows the possible
fixes for this error:
https://github.com/WordPress/WordPress/pull/532
Best Regards,
- Erwin
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52510>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list