mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
efd3e8e99f
commit
05c7b40a29
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user