Make WordPress Core


Ignore:
Timestamp:
05/16/2014 09:08:15 PM (10 years ago)
Author:
wonderboymusic
Message:

The cache key for comments in WP_Comment_Query::query() needs to do wp_array_slice_assoc( $this->query_vars, array_keys( $defaults ) ) instead of compact( array_keys( $defaults ) ). The latter assumes all of those variables are still floating around.

See #22400.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r28459 r28460  
    277277
    278278        // $args can be whatever, only use the args defined in defaults to compute the key
    279         $key = md5( serialize( compact( array_keys( $defaults ) ) )  );
     279        $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $defaults ) ) )  );
    280280        $last_changed = wp_cache_get( 'last_changed', 'comment' );
    281281        if ( ! $last_changed ) {
Note: See TracChangeset for help on using the changeset viewer.