Break global post ref so we don't pollute queries. see #9854

git-svn-id: http://svn.automattic.com/wordpress/trunk@11382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-18 15:56:39 +00:00
parent efd3e8e99f
commit 05c7b40a29

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