From 21d3dd2a76acaa68d73f1dab093d863ba0d6bd9f Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 6 Feb 2008 23:17:13 +0000 Subject: [PATCH] Make sure the theme_dir is a dir before we attempt to closedir(). fixes #5768 git-svn-id: http://svn.automattic.com/wordpress/trunk@6744 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 6cef26f8b6..e6a6f28597 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -175,7 +175,8 @@ function get_themes() { } } } - @closedir($theme_dir); + if ( is_dir( $theme_dir ) ) + @closedir( $theme_dir ); if ( !$themes_dir || !$theme_files ) return $themes;