diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:58:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:58:13 +0000 |
commit | 1c9f89c96d7f1373ecec034fd078f3ab60a77e71 (patch) | |
tree | ecb9ca7fa7ef5bfd4d38721c7310d457cedfae5d /wp-includes/block-template-utils.php | |
parent | Releasing progress-linux version 6.5+dfsg1-1~progress7.99u1. (diff) | |
download | wordpress-1c9f89c96d7f1373ecec034fd078f3ab60a77e71.tar.xz wordpress-1c9f89c96d7f1373ecec034fd078f3ab60a77e71.zip |
Merging upstream version 6.5.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/block-template-utils.php')
-rw-r--r-- | wp-includes/block-template-utils.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index cfae702..8ba4874 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; |