[wp-trac] [WordPress Trac] #57586: term_exists() return type not consistent regarding wp_insert_term()

WordPress Trac noreply at wordpress.org
Mon Jan 30 23:55:31 UTC 2023


#57586: term_exists() return type not consistent regarding wp_insert_term()
------------------------------------+------------------------------
 Reporter:  hugod                   |       Owner:  (none)
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Taxonomy                |     Version:  3.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by peterwilsoncc):

 I believe there have been similar type changes in the past.

 From memory `get_terms()` used to return the ID as a string and it was
 changed to an integer some time around WordPress 4.4. ''The details may be
 a little incorrect, it was 8 years ago 🙂.''

 Further type changes were made for consistency in #53235. As PHP becomes
 stricter, it seems like a step in the right direction.

 Provided there is a dev-note with sufficient warning, I think it's a
 change that can be made early in the release cycle. Probably for a future
 release rather than for WordPress 6.2

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57586#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list