Skip to content
Permalink
Browse files

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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46346 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Sep 29, 2019
1 parent f00bcea commit 679b6a09e622bc758f66ed74d6568c2ae96c4aad
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
@@ -563,7 +563,7 @@ protected function default_additional_properties_to_false( $schema ) {
*
* @since 5.3.0
*
* @param string $type
* @param string $type The schema type.
* @return mixed
*/
protected function get_default_for_type( $type ) {
@@ -577,7 +577,6 @@ protected function get_default_for_type( $type ) {
case 'number':
return 0.0;
case 'array':
return array();
case 'object':
return array();
default:

0 comments on commit 679b6a0

Please sign in to comment.
You can’t perform that action at this time.