Permalink
Browse files

Ensure sticky posts are WP_Post objects. props mdawaffe. see #21309.

git-svn-id: http://core.svn.wordpress.org/trunk@21569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 80159bd commit d65b2caac989e9c631540e8ce77a02a39173faed @nacin nacin committed Aug 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 wp-includes/query.php
View
@@ -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++;
}
}

0 comments on commit d65b2ca

Please sign in to comment.