From 0160d81eee3a5a0ecdd4d5f46c58ad52def291e2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 10 Mar 2008 07:44:23 +0000 Subject: [PATCH] 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 --- 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 ];