Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#48169 closed defect (bug) (fixed)

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

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


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

Attachments (2)

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

Download all attachments as: .zip

Change History (4)

5 years ago

5 years ago

#1 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3

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