[wp-trac] [WordPress Trac] #37591: WP_Term_Query breaks when cache is returned

WordPress Trac noreply at wordpress.org
Sun Aug 7 04:34:02 UTC 2016


#37591: WP_Term_Query breaks when cache is returned
----------------------------+-----------------
 Reporter:  wonderboymusic  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  high            |  Milestone:  4.6
Component:  Taxonomy        |    Version:
 Severity:  blocker         |   Keywords:
  Focuses:                  |
----------------------------+-----------------
 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;
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37591>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list