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. git-svn-id: https://develop.svn.wordpress.org/trunk@28460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cb3341c03d
commit
54bc77cb93
@ -276,7 +276,7 @@ class WP_Comment_Query {
|
||||
do_action_ref_array( 'pre_get_comments', array( &$this ) );
|
||||
|
||||
// $args can be whatever, only use the args defined in defaults to compute the key
|
||||
$key = md5( serialize( compact( array_keys( $defaults ) ) ) );
|
||||
$key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $defaults ) ) ) );
|
||||
$last_changed = wp_cache_get( 'last_changed', 'comment' );
|
||||
if ( ! $last_changed ) {
|
||||
$last_changed = microtime();
|
||||
|
Loading…
Reference in New Issue
Block a user