From 679b6a09e622bc758f66ed74d6568c2ae96c4aad Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 29 Sep 2019 22:33:35 +0000 Subject: [PATCH] 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 --- src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php b/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php index a447a3cdcf..b3ea89a86e 100644 --- a/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php +++ b/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php @@ -563,7 +563,7 @@ abstract class WP_REST_Meta_Fields { * * @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 @@ abstract class WP_REST_Meta_Fields { case 'number': return 0.0; case 'array': - return array(); case 'object': return array(); default: