Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#15944 closed defect (bug) (fixed)

Notice because of non-existent term_id property on post object

Reported by: filosofo's profile filosofo Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Template Keywords: has-patch
Focuses: Cc:


WP shouldn't assume that the queried object is a taxonomy term, when checking to make sure that it's not the same as the parent item of the current menu item.

Attachments (1)

dont-assume-queried-object-is-term.15944.diff (650 bytes) - added by filosofo 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 follow-up: @nacin
13 years ago

Looks sane to fix in 3.1, no?

Also looks like a duplicate of #15935. I'll close that one.

#2 in reply to: ↑ 1 @filosofo
13 years ago

Replying to nacin:

Looks sane to fix in 3.1, no?

I see now that it's a regression from 3.0. I plead the fifth about whose patch introduced it.

#3 @nacin
13 years ago

  • Milestone changed from Future Release to 3.1


#4 @scribu
13 years ago

Couldn't get_queried_object_id() be used instead?

#5 @filosofo
13 years ago

No, because we don't want an accidental coincidence between a post object ID number and term ID number.

#6 @ryan
13 years ago

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

(In [17109]) Don't assume queried object is a term. Fixes non-existent var notice. Props filosofo. fixes #15944

Note: See TracTickets for help on using tickets.