WordPress.org

Make WordPress Core

Ticket #41446: 41446.2.patch

File 41446.2.patch, 476 bytes (added by umangvaghela123, 4 years ago)

This one is proper solution

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

     
    32063206         */
    32073207        public function rewind_posts() {
    32083208                $this->current_post = -1;
    3209                 if ( $this->post_count > 0 ) {
     3209                if ( !empty( $this->posts[0] )  && isset( $this->posts[0] ) && $this->post_count > 0 ) {
    32103210                        $this->post = $this->posts[0];
    32113211                }
    32123212        }