Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#13945 closed defect (bug) (fixed)

Calling setup_postdata prior to wp() being run breaks the query.

Reported by: prettyboymp's profile prettyboymp Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords: has-patch needs-testing
Focuses: Cc:


I was writing code to register sidebars based on a posts of a custom post type. While doing this, I noticed that the manage posts and manage pages screen was showing "No pages found".

After looking into, I found that there is a collision with the global variable $day. Its set as a public query_var, but at the same time is used many other places with a different purpose.

My thoughts are that its safer to change the name of the global $day than to change the query var.

Attachments (1)

13945.diff (2.5 KB) - added by prettyboymp 13 years ago.

Download all attachments as: .zip

Change History (4)

13 years ago

#1 @prettyboymp
13 years ago

  • Cc mpretty@… added
  • Keywords has-patch needs-testing added

#2 @nacin
13 years ago

  • Milestone changed from Awaiting Review to 3.1

Looks sane.

#3 @ryan
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16303]) Prevent stomping of global. Props prettyboymp. fixes #13945

Note: See TracTickets for help on using tickets.