diff options
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/includes/functions_transfer.php | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index c1211eda52..7c5cd329a4 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -737,7 +737,12 @@ class ftp_fsock extends transfer  		$list = array();  		while (!@feof($this->data_connection))  		{ -			$list[] = preg_replace('#[\r\n]#', '', @fgets($this->data_connection, 512)); +			$filename = preg_replace('#[\r\n]#', '', @fgets($this->data_connection, 512)); + +			if ($filename !== '') +			{ +				$list[] = $filename; +			}  		}  		$this->_close_data_connection(); @@ -840,7 +845,7 @@ class ftp_fsock extends transfer  			$result = @fgets($this->connection, 512);  			$response .= $result;  		} -		while (substr($response, 3, 1) != ' '); +		while (substr($result, 3, 1) !== ' ');  		if (!preg_match('#^[123]#', $response))  		{ | 
