[wp-trac] [WordPress Trac] #32786: In get_edit_term_link: $term validation

WordPress Trac noreply at wordpress.org
Thu Jun 25 19:01:04 UTC 2015


#32786: In get_edit_term_link: $term validation
----------------------------------------+------------------------------
 Reporter:  tmatsuur                    |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Taxonomy                    |     Version:  4.2.2
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 Pretty lame that we return `null` from this function instead of a string,
 and pretty lame that we return `null` here but `WP_Error` objects in
 `get_term_link()`. We can't easily change the latter, I guess.

 Can we get two unit tests demonstrating the `null` and `WP_Error` cases?
 Like, one that includes an empty `$term` and one that includes an invalid
 `$taxonomy`.

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


More information about the wp-trac mailing list