WordPress.org

Make WordPress Core

Ticket #22162: 22162.2.diff

File 22162.2.diff, 417 bytes (added by ryan, 18 months ago)

is_a in sanitize_post loop

  • wp-includes/query.php

     
    27762776 
    27772777                // Always sanitize 
    27782778                foreach ( $this->posts as $i => $post ) { 
     2779                        if ( ! is_a( $post, 'WP_Post' ) ) 
     2780                                $this->posts[$i] = new WP_Post( $post ); 
    27792781                        $this->posts[$i] = sanitize_post( $post, 'raw' ); 
    27802782                } 
    27812783