Make sure the theme_dir is a dir before we attempt to closedir(). fixes #5768

git-svn-id: https://develop.svn.wordpress.org/trunk@6744 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-02-06 23:17:13 +00:00
parent 2395f3a566
commit 26c5a4f49d
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;