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
This commit is contained in:
Ryan Boren 2009-05-18 15:56:39 +00:00
parent e170a4d6c1
commit c6debe7b9e
1 changed files with 1 additions and 0 deletions

View File

@ -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);