Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#59478 new enhancement

term_exists() to return false if no terms exist

Reported by: rossb2 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Taxonomy Version:
Severity: normal Keywords:
Cc: Focuses:

Description (last modified by sabernhardt)

When using the function term_exists() in wp-includes/taxonomy.php, it returns null if no terms exist. This behaviour seems incorrect and is inconsistent with other similar functions in the same file (taxonomy_exists() is one example).

It would make more sense to return false.

Change History (1)

#1 @sabernhardt
3 years ago

  • Component GeneralTaxonomy
  • Description modified (diff)
Note: See TracTickets for help on using tickets.