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
This commit is contained in:
markjaquith 2008-02-06 23:17:13 +00:00
parent 302ac4890e
commit 21d3dd2a76
1 changed files with 2 additions and 1 deletions

View File

@ -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;