Make WordPress Core

Opened 13 months ago

Last modified 13 months ago

#59478 new enhancement

term_exists() to return false if no terms exist

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

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
13 months ago

  • Component changed from General to Taxonomy
  • Description modified (diff)
Note: See TracTickets for help on using tickets.