diff options
-rw-r--r-- | phpBB/includes/functions_transfer.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index c345f81e1d..2146d5fa0b 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -316,15 +316,15 @@ class ftp extends transfer return 'ERR_CONNECTING_SERVER'; } - // attempt to turn pasv mode on - @ftp_pasv($this->connection, true); - // login to the server if (!@ftp_login($this->connection, $this->username, $this->password)) { return 'ERR_UNABLE_TO_LOGIN'; } + // attempt to turn pasv mode on + @ftp_pasv($this->connection, true); + // change to the root directory if (!$this->_chdir($this->root_path)) { @@ -462,6 +462,12 @@ class ftp extends transfer { $list = @ftp_nlist($this->connection, $dir); + // Return on error + if ($list === false) + { + return false; + } + // Remove path if prepended foreach ($list as $key => $item) { |