[wp-trac] [WordPress Trac] #21876: unregister_default_headers() will sometimes return null

WordPress Trac noreply at wordpress.org
Wed Feb 26 16:39:09 UTC 2014


#21876: unregister_default_headers() will sometimes return null
------------------------------------+--------------------
 Reporter:  conner_bw               |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.9
Component:  Appearance              |     Version:  3.4.2
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+--------------------

Comment (by obenland):

 I'm usually  always in support of functions returning a single data type.
 But in this case I wonder if it wouldn't be a legitimate case of having
 two types, `bool|void`.

 What is gained by having the function return `true` as soon as we have one
 successful removal of a number of header to be removed? Would you want the
 function to return true if one header was removed, but the other 5 that
 you passed weren't?

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


More information about the wp-trac mailing list