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:
parent
302ac4890e
commit
21d3dd2a76
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue