Make WordPress Core

Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#58612 closed enhancement (invalid)

Invalid return type "void" for get_post_custom_keys

Reported by: kesselb's profile kesselb Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.3
Component: General Keywords: has-patch
Focuses: Cc:




function test() {




Change History (4)

This ticket was mentioned in PR #4683 on WordPress/wordpress-develop by kesselb.

13 months ago

  • Keywords has-patch added

#2 @johnbillion
13 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the report @kesselb. In PHP, void is a special return type which indicates that the function returns nothing. It's not a real type, therefore it gets coerced to null as in your example, but void is the correct type here.


@johnbillion commented on PR #4683:

13 months ago

Closing as per the ticket.

kesselb commented on PR #4683:

13 months ago

Would you accept the change if I change return; to return null; as you suggest in

Note: See TracTickets for help on using tickets.