Opened 3 years ago
Last modified 12 months ago
#59785 new defect (bug)
Fatal error: Attempt to assign property “object_id” on bool in class-wp-term-query.php
| Reported by: | Faar | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Taxonomy | Version: | 6.3.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
The populate_terms() function in this class still throws a PHP fatal error on the get_term() query. Why?
In special circumstances, get_term() returns NULL and the variable $term is not checked to see if it is still an object or already boolean.
$term = NULL and this leads to a fatal PHP error and the page loading is aborted because $term->object_id does not work with NULL.
NULL->object_id
More to read here:
https://wordpress.org/support/topic/fatal-error-attempt-to-assign-property-object_id-on-bool/
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This solved the Error:
Asking, if is object $term.