diff --git a/wp-includes/query.php b/wp-includes/query.php index edb5ba6dd9..60228dbbec 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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'] )