WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#48169 closed defect (bug) (fixed)

Use empty case for `array` in `WP_REST_Meta_Fields::get_default_for_type`

Reported by: itowhid06 Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: trivial Version:
Component: REST API Keywords: has-patch
Focuses: coding-standards Cc:
PR Number:

Description

Use empty case for array, as case array and object both returns empty array

Attachments (2)

48169.diff (496 bytes) - added by itowhid06 4 months ago.
48169.1.patch (641 bytes) - added by dkarfa 4 months ago.

Download all attachments as: .zip

Change History (4)

@itowhid06
4 months ago

@dkarfa
4 months ago

#1 @SergeyBiryukov
4 months ago

  • Milestone changed from Awaiting Review to 5.3

#2 @SergeyBiryukov
4 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 46346:

REST API: Combine array and object cases in WP_REST_Meta_Fields::get_default_for_type() to remove duplicated line.

Add missing description for $type parameter.

Props itowhid06, dkarfa.
Fixes #48169.

Note: See TracTickets for help on using tickets.