Make WordPress Core

Opened 7 years ago

Closed 7 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
Priority: normal Milestone: 5.3
Component: REST API Version:
Severity: trivial Keywords: has-patch
Cc: Focuses: coding-standards

Description

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

Attachments (2)

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

Download all attachments as: .zip

Change History (4)

@itowhid06
7 years ago

@dkarfa
7 years ago

#1 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review5.3

#2 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

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.