Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#48613 closed defect (bug) (fixed)

Return type of _admin_notice_post_locked unknown phpdoc keyword

Reported by: diddledani Owned by: SergeyBiryukov
Priority: normal Milestone: 5.4
Component: Administration Version:
Severity: trivial Keywords: has-patch
Cc: Focuses: docs

Description

In wp-admin/includes/post.php the return type of _admin_notice_post_locked is documented as none, which is not a valid keyword according to the phpdoc specification: https://docs.phpdoc.org/guides/types.html

The attached patch corrects none to be void. Alternatively the @return documentation tag might be removed altogether for the same effect.

Attachments (1)

48613.patch (847 bytes ) - added by diddledani 7 years ago.
Patch to set return type to void

Download all attachments as: .zip

Change History (4)

@diddledani
7 years ago

Patch to set return type to void

#1 @johnbillion
7 years ago

  • Milestone Awaiting Review5.4
  • Version trunk

#2 @SergeyBiryukov
7 years ago

I think this can just be removed. Per the documentation standards:

Note: @return void should not be used outside of the default bundled themes.

#3 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 46732:

Docs: Remove incorrect @return tags.

Props diddledan.
Fixes #48613, #48614.

Note: See TracTickets for help on using tickets.