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:
parent
2395f3a566
commit
26c5a4f49d
|
@ -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