[wp-trac] [WordPress Trac] #56338: `taxonomy_exists()` does not guard against non-string arguments.

WordPress Trac noreply at wordpress.org
Tue Aug 9 10:21:46 UTC 2022


#56338: `taxonomy_exists()` does not guard against non-string arguments.
--------------------------------------------------+-----------------------
 Reporter:  costdev                               |       Owner:  audrasjb
     Type:  defect (bug)                          |      Status:  closed
 Priority:  normal                                |   Milestone:  6.1
Component:  Taxonomy                              |     Version:  3.0
 Severity:  normal                                |  Resolution:  fixed
 Keywords:  php8 has-patch has-unit-tests commit  |     Focuses:
--------------------------------------------------+-----------------------
Changes (by audrasjb):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53869" 53869]:
 {{{
 #!CommitTicketReference repository="" revision="53869"
 Taxonomy: Prevent non string taxonomy names generating warnings or errors.

 This changeset adds an `is_string( $taxonomy )` check to the condition in
 `taxonomy_exists()`, to ensure `false` is returned when the `$taxonomy` is
 not a string.

 Follow-up to [35718].

 Props costdev, peterwilsoncc, mukesh27.
 Fixes #56338.
 See #56336.
 }}}

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


More information about the wp-trac mailing list