From ec2942e03ef86bb05f712760c14302345e8faa65 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 11 Jul 2019 07:20:40 +0000 Subject: [PATCH] Block Editor: Avoid a PHP warning when a theme adds an editor style with an empty filename. Fixes #45739. git-svn-id: https://develop.svn.wordpress.org/trunk@45619 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-blocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 373a6b3cc4..60f44edee9 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -192,7 +192,7 @@ if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) { } } else { $file = get_theme_file_path( $style ); - if ( file_exists( $file ) ) { + if ( is_file( $file ) ) { $styles[] = array( 'css' => file_get_contents( $file ), 'baseURL' => get_theme_file_uri( $style ),