Opened 11 years ago
Closed 11 years ago
#25451 closed defect (bug) (fixed)
status_header() incorrect return statement
Reported by: | tivnet | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | trivial | Version: | 2.0 |
Component: | Inline Docs | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Attempt to return @header(...
while header()
is void
.
Attachments (3)
Change History (11)
#2
in reply to:
↑ 1
@
11 years ago
Replying to 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...
#3
in reply to:
↑ 1
@
11 years ago
Replying to SergeyBiryukov:
Should we perhaps just omit the
return
(like in #25450), to keep the current behaviour?
Made a new patch. Please take a look. Thank you!
#4
in reply to:
↑ 1
@
11 years ago
Replying to SergeyBiryukov:
Sergey, could you please make a resolution on this? The most recent patch does not have the @return
.
Thank you!
#6
follow-up:
↓ 7
@
11 years ago
- Keywords commit added
25451.patch is another take. Renamed some variables for clarity. Removed @uses apply_filters()
, as the filter itself should be documented instead.
#7
in reply to:
↑ 6
@
11 years ago
Replying to SergeyBiryukov:
25451.patch is another take. Renamed some variables for clarity. Removed
@uses apply_filters()
, as the filter itself should be documented instead.
25451.patch works for me. +1 for documenting with code :)
Should we perhaps just omit the
return
(like in #25450), to keep the current behaviour?