Opened 13 months ago
Last modified 5 weeks 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: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.3.3 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
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 (4)
Note: See
TracTickets for help on using
tickets.
This solved the Error:
Asking, if is object $term.