Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#53264 closed defect (bug) (fixed)

_wp_array_get() example incorrect

Reported by: dd32's profile dd32 Owned by: desrosj's profile desrosj
Milestone: 5.8 Priority: normal
Severity: minor Version:
Component: General Keywords: good-first-bug has-patch
Focuses: docs Cc:


The php syntax in the _wp_array_get() example is invalid:

_wp_array_get( $array, array( 'a', 'b', 'c' );

The final ) is missing, creating a ticket here as the example is pulled from PHPDoc directly.

Attachments (1)

53264.diff (724 bytes) - added by thomasplevy 3 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
3 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.8

#2 @SergeyBiryukov
3 years ago

Just noting that this also applies to _wp_array_set() introduced in [50958] / #53175.

3 years ago

#3 @desrosj
3 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to desrosj
  • Status changed from new to reviewing

#4 @desrosj
3 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 51041:

General: Correct the inline code examples for _wp_array_get() and `_wp_array_set().

Props thomasplevy, SergeyBiryukov.
Fixes #53264.

Note: See TracTickets for help on using tickets.