[wp-trac] [WordPress Trac] #25451: status_header() incorrect return statement

WordPress Trac noreply at wordpress.org
Tue Oct 1 03:46:51 UTC 2013


#25451: status_header() incorrect return statement
--------------------------+------------------------------
 Reporter:  tivnet        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Inline Docs   |     Version:  2.0
 Severity:  trivial       |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by tivnet):

 Replying to [comment:1 SergeyBiryukov]:
 > Should we perhaps just omit the `return` (like in #25450), to keep the
 current behaviour?

 In this specific function, boolean return can make some sense, in my
 opinion.
 For example, we can add `headers_sent()` validation, and return false if
 already sent?

 You are right, the simplest patch would be indeed just omitting the
 return. But, do we expect anyone to really know if the method worked? If
 yes, then boolean return can be a good start...

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25451#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list