diff --git a/wp-includes/theme.php b/wp-includes/theme.php index fa3ef0939a..ea3d3c9496 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -634,8 +634,7 @@ function search_theme_directories() { } } } - if ( is_dir( $theme_dir ) ) - @closedir( $theme_dir ); + @closedir( $themes_dir ); } return $theme_files; }