WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#53264 closed defect (bug) (fixed)

_wp_array_get() example incorrect

Reported by: dd32 Owned by: 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 4 months ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
4 months ago

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

#2 @SergeyBiryukov
4 months ago

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

@thomasplevy
4 months ago

#3 @desrosj
4 months ago

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

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