WordPress.org

Make WordPress Core

Ticket #42860: 42860-1.patch

File 42860-1.patch, 555 bytes (added by ayeshrajans, 2 years ago)

Tests: https://travis-ci.org/Ayesh/wordpress-develop/builds/314423062

  • src/wp-includes/class-wp-query.php

    diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
    index afc8f9691a..10048ba73e 100644
    a b private function set_found_posts( $q, $limits ) { 
    30323032                         */
    30333033                        $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
    30343034                } else {
    3035                         $this->found_posts = count( $this->posts );
     3035                        $this->found_posts = $this->posts ? count( $this->posts ) : 0;
    30363036                }
    30373037
    30383038                /**