Unset from GLOBALS. see #9854
git-svn-id: https://develop.svn.wordpress.org/trunk@11386 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
36a5a9137f
commit
8f2d1010bb
|
@ -2381,9 +2381,9 @@ class WP_Query {
|
||||||
* @uses do_action() Calls 'loop_start' if loop has just started
|
* @uses do_action() Calls 'loop_start' if loop has just started
|
||||||
*/
|
*/
|
||||||
function the_post() {
|
function the_post() {
|
||||||
|
unset($GLOBALS['post']); // Break the ref
|
||||||
global $post;
|
global $post;
|
||||||
$this->in_the_loop = true;
|
$this->in_the_loop = true;
|
||||||
unset($post); // Break the ref
|
|
||||||
$post = $this->next_post();
|
$post = $this->next_post();
|
||||||
setup_postdata($post);
|
setup_postdata($post);
|
||||||
do_action('the_post', $post);
|
do_action('the_post', $post);
|
||||||
|
|
Loading…
Reference in New Issue