From 39805b060738262945acc9301cca19277d8302a1 Mon Sep 17 00:00:00 2001 From: "F.Z.B" Date: Fri, 31 Jul 2015 14:45:56 +0800 Subject: [PATCH 1/3] fix : Undefined variable: user --- FtpComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FtpComponent.php b/FtpComponent.php index a1c7cea..b1e5adf 100644 --- a/FtpComponent.php +++ b/FtpComponent.php @@ -176,7 +176,7 @@ public function connect() { public function login () { $this->connectIfNeeded(false); $this->handle->login(); - $this->onLogin(new Event(['sender' => $this, 'data' => $user])); + $this->onLogin(new Event(['sender' => $this, 'data' => $this->handle->user])); } /** From 3885562d1766672a943f308ead745985a576386e Mon Sep 17 00:00:00 2001 From: "F.Z.B" Date: Fri, 31 Jul 2015 14:55:22 +0800 Subject: [PATCH 2/3] fix : Undefined variable: full_remote_file --- drivers/FtpDriver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/FtpDriver.php b/drivers/FtpDriver.php index 6152e35..11b9fc1 100644 --- a/drivers/FtpDriver.php +++ b/drivers/FtpDriver.php @@ -481,13 +481,13 @@ public function put($local_file, $remote_file = null, $mode = FTP_ASCII, $asynch if ($ret !== FTP_FINISHED) { throw new FtpException( Yii::t('gftp', 'Could not put file "{local_file}" on "{remote_file}" on server "{host}"', [ - 'host' => $this->host, 'remote_file' => $full_remote_file, 'local_file' => $local_file + 'host' => $this->host, 'remote_file' => $remote_file, 'local_file' => $local_file ]) ); } } - return $full_remote_file; + return $remote_file; } /** From c262c388761cb05c019672b40c0fed2038789d97 Mon Sep 17 00:00:00 2001 From: "F.Z.B" Date: Fri, 31 Jul 2015 14:56:58 +0800 Subject: [PATCH 3/3] fix:Getting unknown property: gftp\FtpComponent::param --- FtpComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FtpComponent.php b/FtpComponent.php index b1e5adf..b2a79c3 100644 --- a/FtpComponent.php +++ b/FtpComponent.php @@ -289,7 +289,7 @@ public function get($mode, $remote_file, $local_file = null, $asynchronous = fal public function put($mode, $local_file, $remote_file = null, $asynchronous = false) { $this->connectIfNeeded(); $full_remote_file = $this->handle->put($mode, $local_file, $remote_file, $asynchronous); - $this->onFileUploaded(new Event(['sender' => $this, 'data' => $this->param])); + $this->onFileUploaded(new Event(['sender' => $this, 'data' => $remote_file])); return $full_remote_file; }