diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 74ec34c9f2..c81f40e5fd 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -197,11 +197,13 @@ if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) { ); } } else { - $file = get_theme_file_path( $style ); - $styles[] = array( - 'css' => file_get_contents( get_theme_file_path( $style ) ), - 'baseURL' => get_theme_file_uri( $style ), - ); + $file = get_theme_file_path( $style ); + if ( file_exists( $file ) ) { + $styles[] = array( + 'css' => file_get_contents( $file ), + 'baseURL' => get_theme_file_uri( $style ), + ); + } } } }