Return error if base dir empty. Props DD32. see #5586

git-svn-id: http://svn.automattic.com/wordpress/trunk@7205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-10 07:44:23 +00:00
parent 8aab63b7cf
commit dad505b57e
1 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,9 @@ function wp_update_plugin($plugin, $feedback = '') {
//Get the Base folder //Get the Base folder
$base = $wp_filesystem->get_base_dir(); $base = $wp_filesystem->get_base_dir();
if ( empty($base) )
return new WP_Error('fs_nowordpress', __('Unable to locate WordPress directory.'));
// Get the URL to the zip file // Get the URL to the zip file
$r = $current->response[ $plugin ]; $r = $current->response[ $plugin ];