From dad505b57e34003da6cc55859251b17540136c7a Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 10 Mar 2008 07:44:23 +0000 Subject: [PATCH] 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 --- wp-admin/includes/update.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 86e02bae65..544673a782 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -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 ];