Opened 3 years ago
Closed 6 months ago
#57835 closed defect (bug) (duplicate)
class-wp-term-query.php no error checking
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Taxonomy | Keywords: | reporter-feedback |
| Focuses: | Cc: |
Description (last modified by )
Attempt to read property "count" on null in /wp-includes/class-wp-term-query.php on line 768.
Does not check for failure of get_term function. Causes very annoying PHP warnings.
Change History (6)
#2
@
3 years ago
Hello,
I also can not find any call to count on line 768 in that file in the trunk.
But I found some code about count on line 802. are you talking about that?
#3
@
3 years ago
- Component changed from General to Taxonomy
- Description modified (diff)
The 768 line number is more than two years old, but the condition still checks $child->count on the current line 844.
$child = get_term( $child_id, $term->taxonomy );
if ( $child->count ) {
continue 2;
}
Note: See
TracTickets for help on using
tickets.
I can not find any call to
counton line768in that file intrunkor6.1. What version of WordPress is this issue present?