mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@22011 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1fa4a04b7c
commit
4c29375d2c
@ -2676,7 +2676,8 @@ class WP_Query {
|
||||
}
|
||||
|
||||
// Convert to WP_Post objects
|
||||
$this->posts = array_map( 'get_post', $this->posts );
|
||||
if ( $this->posts )
|
||||
$this->posts = array_map( 'get_post', $this->posts );
|
||||
|
||||
// Raw results filter. Prior to status checks.
|
||||
if ( !$q['suppress_filters'] )
|
||||
|
||||
Loading…
Reference in New Issue
Block a user