mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 08:37:55 +02: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: http://core.svn.wordpress.org/trunk@22011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eac5264361
commit
09806c6b5f
@ -2676,6 +2676,7 @@ class WP_Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert to WP_Post objects
|
// Convert to WP_Post objects
|
||||||
|
if ( $this->posts )
|
||||||
$this->posts = array_map( 'get_post', $this->posts );
|
$this->posts = array_map( 'get_post', $this->posts );
|
||||||
|
|
||||||
// Raw results filter. Prior to status checks.
|
// Raw results filter. Prior to status checks.
|
||||||
|
Loading…
Reference in New Issue
Block a user