Opened 9 years ago
Closed 9 years ago
#37591 closed defect (bug) (fixed)
WP_Term_Query breaks when cache is returned
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.6 | Priority: | high |
| Severity: | blocker | Version: | |
| Component: | Taxonomy | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Found this bug on NYT in production since I am running the RC there #yolo
as originally reported here:
https://wordpress.slack.com/archives/core/p1470433813002336
$cache = wp_cache_get( $cache_key, 'terms' );
if ( false !== $cache ) {
if ( 'all' === $_fields ) {
$cache = array_map( 'get_term', $cache );
}
return $cache;
}
Needs to be:
$cache = wp_cache_get( $cache_key, 'terms' );
if ( false !== $cache ) {
if ( 'all' === $_fields ) {
$cache = array_map( 'get_term', $cache );
}
$this->terms = $cache;
return $cache;
}
Attachments (1)
Note: See
TracTickets for help on using
tickets.
In 38211: