Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit d65b2caac989e9c631540e8ce77a02a39173faed 1 parent 80159bd
Andrew Nacin nacin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  wp-includes/query.php
2  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++;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.