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

git-svn-id: https://develop.svn.wordpress.org/trunk@7205 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-10 07:44:23 +00:00
parent 64aaf796c2
commit 0160d81eee
1 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,9 @@ function wp_update_plugin($plugin, $feedback = '') {
//Get the Base folder
$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
$r = $current->response[ $plugin ];