Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #41867, comment 8


Ignore:
Timestamp:
02/21/2019 03:13:59 AM (6 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41867, comment 8

    initial v1  
    22
    33In this location, I'm only able to trigger the error by passing either an empty array or an array that only contains things that aren't `WP_Term` objects to `_pad_term_counts()`. `_pad_term_counts()`, for its part, is called just once in WP, by `WP_Term_Query`. It should never receive an empty array in this instance, since empty `$terms` array cause the method to return early. See https://core.trac.wordpress.org/browser/tags/5.0.3/src/wp-includes/class-wp-term-query.php?marks=699-702,716#L696 So it must be that `$terms` passed to this function are not `WP_Term` objects. Perhaps this is a result of a corrupted `'terms'` cache?
    4 
    5 I suspect that `_pad_term_counts()` is being called by