diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php index d9ff86e1fa..e6771ff851 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php @@ -563,7 +563,10 @@ class WP_REST_Global_Styles_Controller extends WP_REST_Controller { } if ( rest_is_field_included( 'styles', $fields ) ) { - $data['styles'] = $theme->get_raw_data()['styles']; + $raw_data = $theme->get_raw_data(); + if ( isset( $raw_data['styles'] ) ) { + $data['styles'] = $raw_data['styles']; + } } $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; diff --git a/wp-includes/version.php b/wp-includes/version.php index 14d56ac2b0..3da121199a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52749'; +$wp_version = '6.0-alpha-52750'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.