From c6debe7b9e96c27d9eac4fe8c15ebcf9a8865ece Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 18 May 2009 15:56:39 +0000 Subject: [PATCH] Break global post ref so we don't pollute queries. see #9854 git-svn-id: https://develop.svn.wordpress.org/trunk@11382 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index 70523e6116..efc4d5d804 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2383,6 +2383,7 @@ class WP_Query { function the_post() { global $post; $this->in_the_loop = true; + unset($post); // Break the ref $post = $this->next_post(); setup_postdata($post); do_action('the_post', $post);