WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#4651 closed defect (bug) (fixed)

get_term_by sanitizes incorrect field when using the slug

Reported by: cavemonkey50 Owned by: anonymous
Priority: normal Milestone: 2.3
Component: General Version: 2.3
Severity: normal Keywords: has-patch
Cc:

Description

When using get_term_by to get a term by a slug, the results are blank. This is due to get_term_by sanitizing the field name instead of the term name. The attached patch corrects this problem.

Attachments (1)

get_term_by_slug_fix.diff (410 bytes) - added by cavemonkey50 6 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 ryan6 years ago

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

(In [5865]) sanitize the value, not the field. Props cavemonkey50. fixes #4651

Note: See TracTickets for help on using tickets.