Opened 10 years ago
Closed 10 years ago
#37591 closed defect (bug) (fixed)
WP_Term_Query breaks when cache is returned
| Reported by: | wonderboymusic | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | high | Milestone: | 4.6 |
| Component: | Taxonomy | Version: | |
| Severity: | blocker | Keywords: | has-patch commit |
| Cc: | Focuses: |
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)
Change History (7)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 38211: