Don't use closed dir handle. Props Miloslav. fixes #13322
git-svn-id: http://svn.automattic.com/wordpress/trunk@14540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
021bb7d9cc
commit
45e43282ed
|
@ -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