Ticket #14426: 14426.diff

File 14426.diff, 588 bytes (added by ryan, 7 months ago)
  • wp-includes/query.php

     
    27992799        function set_found_posts( $q, $limits ) { 
    28002800                global $wpdb; 
    28012801 
    2802                 if ( $q['no_found_rows'] || ! $this->posts ) 
     2802                // Bail if posts is an empty array. Continue if posts is an empty string 
     2803                // null, or false to accommodate caching plugins that fill posts later. 
     2804                if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) ) 
    28032805                        return; 
    28042806 
    28052807                if ( ! empty( $limits ) )