#35915 closed defect (bug) (fixed)
Documentation of `get_preview_post_link` declares missing return variable type information
Reported by: | chris_dev | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | trivial | Version: | 4.4 |
Component: | General | Keywords: | has-patch has-unit-tests |
Focuses: | docs | Cc: |
Description
Super simple, but I just noticed that the inline documentation for the get_preview_post_link
says it returns string
but actually it returns void as well.
Trivial patch attached.
Attachments (3)
Change History (12)
#4
@
9 years ago
- Keywords has-patch has-unit-tests added; needs-patch removed
- Milestone changed from 4.5 to Future Release
@chris_dev Yes, that's what I meant. Thanks for the refreshed patch!
I added some unit tests in 35915.diff and changed the return value to null
because that's what a void function returns in PHP.
Note: See
TracTickets for help on using
tickets.
It needs to be documented in which cases it returns
void
.Though I think it's weird it doesn't return an empty string or
false
. Perhaps changing that is the better solution.