[wp-trac] [WordPress Trac] #37291: Check for WP_Error before echo in the_tags()

WordPress Trac noreply at wordpress.org
Tue Oct 11 01:44:59 UTC 2016


#37291: Check for WP_Error before echo in the_tags()
-------------------------------------+--------------------
 Reporter:  michalzuber              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  4.6.2
Component:  Taxonomy                 |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+--------------------

Comment (by boonebgorges):

 > One case I was worried about was where it'd just continuously return a
 WP_Error when the cache was invalid, however by switching purely to
 get_term() that would cause it to fall back to the database anyway,
 correct?

 Yup, all the caching logic is hidden inside of `get_term()`. This is
 better anyway, since it means less exposure of the cache internals.

 > I also assume there's a PHPDoc update to go with that though.

 Great, I'll add this and commit. Thanks!

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


More information about the wp-trac mailing list