Skip to content

Commit

Permalink
Ensure sticky posts are WP_Post objects. props mdawaffe. see #21309.
Browse files Browse the repository at this point in the history
git-svn-id: http://core.svn.wordpress.org/trunk@21569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Aug 21, 2012
1 parent 80159bd commit d65b2ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-includes/query.php
Expand Up @@ -2750,7 +2750,7 @@ function &get_posts() {
// Ignore sticky posts the current user cannot read or are not published.
if ( 'publish' != $sticky_post->post_status )
continue;
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
array_splice($this->posts, $sticky_offset, 0, array( get_post( $sticky_post ) ) );
$sticky_offset++;
}
}
Expand Down

0 comments on commit d65b2ca

Please sign in to comment.