Make WordPress Core

Ticket #35075: 35075.4.patch

File 35075.4.patch, 1.9 KB (added by jason_the_adams, 9 years ago)
  • src/wp-includes/class-wp-comment-query.php

    diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php
    index e30094d..11c967a 100644
    a b class WP_Comment_Query { 
    363363                }
    364364
    365365                // $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
    366                 $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ) ) );
     366                $key = md5( serialize( $this->query_vars ) );
    367367                $last_changed = wp_cache_get( 'last_changed', 'comment' );
    368368                if ( ! $last_changed ) {
    369369                        $last_changed = microtime();
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index cc8e843..1f9e6eb 100644
    a b function get_pages( $args = array() ) { 
    44024402        }
    44034403
    44044404        // $args can be whatever, only use the args defined in defaults to compute the key.
    4405         $key = md5( serialize( wp_array_slice_assoc( $r, array_keys( $defaults ) ) ) );
     4405        $key = md5( serialize( $r ) );
    44064406        $last_changed = wp_cache_get( 'last_changed', 'posts' );
    44074407        if ( ! $last_changed ) {
    44084408                $last_changed = microtime();
  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index 78dd52c..d9ba68e 100644
    a b function get_terms( $taxonomies, $args = '' ) { 
    14371437        $query = "SELECT $distinct $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits";
    14381438
    14391439        // $args can be anything. Only use the args defined in defaults to compute the key.
    1440         $key = md5( serialize( wp_array_slice_assoc( $args, array_keys( $defaults ) ) ) . serialize( $taxonomies ) . $query );
     1440        $key = md5( serialize( $args ) . serialize( $taxonomies ) . $query );
    14411441        $last_changed = wp_cache_get( 'last_changed', 'terms' );
    14421442        if ( ! $last_changed ) {
    14431443                $last_changed = microtime();