From d65b2caac989e9c631540e8ce77a02a39173faed Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 21 Aug 2012 04:04:54 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 39168345b6..e249ec2ee3 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2750,7 +2750,7 @@ class WP_Query { // 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++; } }