| @@ 81-91 (lines=11) @@ | ||
| 78 | ); |
|
| 79 | } |
|
| 80 | ||
| 81 | if (!ftp_login($ftpConnection, $this->user, $this->password)) { |
|
| 82 | error_reporting($old); |
|
| 83 | throw new Exception( |
|
| 84 | sprintf( |
|
| 85 | 'authentication failed for %s@%s%s', |
|
| 86 | $this->user, |
|
| 87 | $this->host, |
|
| 88 | empty($this->password) ? '' : ' with password ****' |
|
| 89 | ) |
|
| 90 | ); |
|
| 91 | } |
|
| 92 | ||
| 93 | $remoteFilename = $target->getFilename(); |
|
| 94 | $localFile = $target->getPathname(); |
|
| @@ 86-96 (lines=11) @@ | ||
| 83 | // silence phpseclib |
|
| 84 | $old = error_reporting(0); |
|
| 85 | $sftp = new phpseclib\Net\SFTP($this->host); |
|
| 86 | if (!$sftp->login($this->user, $this->password)) { |
|
| 87 | error_reporting($old); |
|
| 88 | throw new Exception( |
|
| 89 | sprintf( |
|
| 90 | 'authentication failed for %s@%s%s', |
|
| 91 | $this->user, |
|
| 92 | $this->host, |
|
| 93 | empty($this->password) ? '' : ' with password ****' |
|
| 94 | ) |
|
| 95 | ); |
|
| 96 | } |
|
| 97 | // restore old error reporting |
|
| 98 | error_reporting($old); |
|
| 99 | ||