Ticket #15944 (closed defect (bug): fixed)

Opened 17 months ago

Last modified 17 months ago

Notice because of non-existent term_id property on post object

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

Description

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

dont-assume-queried-object-is-term.15944.diff Download (650 bytes) - added by filosofo 17 months ago.

Change History

comment:1 follow-up: ↓ 2   nacin17 months ago

Looks sane to fix in 3.1, no?

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

comment:2 in reply to: ↑ 1   filosofo17 months 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.

  • Milestone changed from Future Release to 3.1

:-)

Couldn't get_queried_object_id() be used instead?

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

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

(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.