[wp-trac] [WordPress Trac] #59478: term_exists() to return false if no terms exist
WordPress Trac
noreply at wordpress.org
Wed Sep 27 11:38:10 UTC 2023
#59478: term_exists() to return false if no terms exist
-------------------------+-----------------------------
Reporter: rossb2 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59478>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list