Make WordPress Core

Changeset 22011


Ignore:
Timestamp:
09/26/2012 12:32:54 PM (12 years ago)
Author:
ryan
Message:

Convert the object in the posts array to WP_Post only if the posts array is not empty. Some post caching plugins can cause it to be empty. see #21309

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r21928 r22011  
    26772677
    26782678        // Convert to WP_Post objects
    2679         $this->posts = array_map( 'get_post', $this->posts );
     2679        if ( $this->posts )
     2680            $this->posts = array_map( 'get_post', $this->posts );
    26802681
    26812682        // Raw results filter. Prior to status checks.
Note: See TracChangeset for help on using the changeset viewer.