Changeset 11005 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 04/19/2009 07:36:28 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r11002 r11005 217 217 // Files in wp-content/plugins directory 218 218 $plugins_dir = @ opendir( $plugin_root); 219 $plugin_files = array(); 219 220 if ( $plugins_dir ) { 220 221 while (($file = readdir( $plugins_dir ) ) !== false ) { … … 240 241 @closedir( $plugins_subdir ); 241 242 242 if ( !$plugins_dir || !$plugin_files)243 if ( !$plugins_dir || empty($plugin_files) ) 243 244 return $wp_plugins; 244 245 … … 433 434 } 434 435 435 if ( $wp_filesystem->errors->get_error_code() ) {436 return $wp_filesystem->errors;437 }438 439 436 if ( ! is_object($wp_filesystem) ) 440 437 return new WP_Error('fs_unavailable', __('Could not access filesystem.')); 441 438 442 if ( $wp_filesystem->errors->get_error_code() )439 if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) 443 440 return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); 444 441
Note: See TracChangeset
for help on using the changeset viewer.