Make WordPress Core

Opened 2 years ago

Closed 2 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:

Description

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 2 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
2 years ago

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

#2 @SergeyBiryukov
2 years ago

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

@thomasplevy
2 years ago

#3 @desrosj
2 years ago

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

#4 @desrosj
2 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.