3 | 3 | In 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? |