Don't use closed dir handle. Props Miloslav. fixes #13322
git-svn-id: https://develop.svn.wordpress.org/trunk@14540 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5c149c17ae
commit
eac401c171
@ -238,11 +238,14 @@ function get_plugins($plugin_folder = '') {
|
||||
$plugin_files[] = $file;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return $wp_plugins;
|
||||
}
|
||||
|
||||
@closedir( $plugins_dir );
|
||||
@closedir( $plugins_subdir );
|
||||
|
||||
if ( !$plugins_dir || empty($plugin_files) )
|
||||
if ( empty($plugin_files) )
|
||||
return $wp_plugins;
|
||||
|
||||
foreach ( $plugin_files as $plugin_file ) {
|
||||
|
Loading…
Reference in New Issue
Block a user