diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index 61ae17cc1c..bd8dfeefb2 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -229,14 +229,12 @@ function _get_block_templates_paths( $base_directory ) { return $template_path_list[ $base_directory ]; } $path_list = array(); - try { + if ( is_dir( $base_directory ) ) { $nested_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $base_directory ) ); $nested_html_files = new RegexIterator( $nested_files, '/^.+\.html$/i', RecursiveRegexIterator::GET_MATCH ); foreach ( $nested_html_files as $path => $file ) { $path_list[] = $path; } - } catch ( Exception $e ) { - // Do nothing. } $template_path_list[ $base_directory ] = $path_list; return $path_list; diff --git a/wp-includes/version.php b/wp-includes/version.php index aa4bd68814..5ffee4e723 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57926'; +$wp_version = '6.6-alpha-57928'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.