WordPress.org

Make WordPress Core

Opened 2 years ago

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

Description

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

Attachments (2)

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

Download all attachments as: .zip

Change History (4)

@itowhid06
2 years ago

@dkarfa
2 years ago

#1 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 5.3

#2 @SergeyBiryukov
2 years 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.