diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php index dd40d93d2b..b32f012542 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php @@ -344,8 +344,10 @@ abstract class WP_REST_Controller { $schema = $this->get_item_schema(); - foreach ( $schema['properties'] as &$property ) { - unset( $property['arg_options'] ); + if ( ! empty( $schema['properties'] ) ) { + foreach ( $schema['properties'] as &$property ) { + unset( $property['arg_options'] ); + } } return $schema; diff --git a/wp-includes/version.php b/wp-includes/version.php index 6b432ebdde..80220394cd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-beta2-47327'; +$wp_version = '5.4-beta2-47328'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.