Make WordPress Core

Ticket #42469: 42469.1.patch

File 42469.1.patch, 789 bytes (added by PressLabs, 7 years ago)
  • src/wp-includes/class-wp-query.php

     
    30303030                         * @param string   $found_posts The query to run to find the found posts.
    30313031                         * @param WP_Query $this        The WP_Query instance (passed by reference).
    30323032                         */
    3033                         $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
     3033                        $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );
     3034
     3035                        $this->found_posts = (int) $wpdb->get_var( $found_posts_query );
    30343036                } else {
    30353037                        $this->found_posts = count( $this->posts );
    30363038                }