diff options
Diffstat (limited to 'phpBB/includes/functions_transfer.php')
| -rw-r--r-- | phpBB/includes/functions_transfer.php | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 3a3bb24563..4c47f99412 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -265,7 +265,11 @@ class ftp extends transfer  		// Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ at the end)  		$this->root_path	= str_replace('\\', '/', $this->root_path); -		$this->root_path	= (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); + +		if (!empty($root_path)) +		{ +			$this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); +		}  		// Init some needed values  		transfer::transfer(); @@ -479,7 +483,11 @@ class ftp_fsock extends transfer  		// Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ at the end)  		$this->root_path	= str_replace('\\', '/', $this->root_path); -		$this->root_path	= (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); + +		if (!empty($root_path)) +		{ +			$this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); +		}  		// Init some needed values  		transfer::transfer();  | 
