Skip to content

Commit d446640

Browse files
authored
Merge pull request #42 from BenMorel/warnings
remove muted warnings
2 parents 6dee970 + cf7d2ba commit d446640

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/FtpClient/FtpClient.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ public function help()
150150
public function connect($host, $ssl = false, $port = 21, $timeout = 90)
151151
{
152152
if ($ssl) {
153-
$this->conn = @$this->ftp->ssl_connect($host, $port, $timeout);
153+
$this->conn = $this->ftp->ssl_connect($host, $port, $timeout);
154154
} else {
155-
$this->conn = @$this->ftp->connect($host, $port, $timeout);
155+
$this->conn = $this->ftp->connect($host, $port, $timeout);
156156
}
157157

158158
if (!$this->conn) {
@@ -243,7 +243,7 @@ public function modifiedTime($remoteFile, $format = null)
243243
*/
244244
public function up()
245245
{
246-
$result = @$this->ftp->cdup();
246+
$result = $this->ftp->cdup();
247247

248248
if ($result === false) {
249249
throw new FtpException('Unable to get parent folder');
@@ -372,7 +372,7 @@ public function mkdir($directory, $recursive = false)
372372
continue;
373373
}
374374

375-
if (!@$this->ftp->chdir($part)) {
375+
if (!$this->ftp->chdir($part)) {
376376
$result = $this->ftp->mkdir($part);
377377
$this->ftp->chdir($part);
378378
}
@@ -447,8 +447,8 @@ public function cleanDir($directory)
447447
public function remove($path, $recursive = false)
448448
{
449449
try {
450-
if (@$this->ftp->delete($path)
451-
or ($this->isDir($path) and @$this->rmdir($path, $recursive))) {
450+
if ($this->ftp->delete($path)
451+
or ($this->isDir($path) and $this->rmdir($path, $recursive))) {
452452
return true;
453453
}
454454

@@ -473,7 +473,7 @@ public function isDir($directory)
473473
throw new FtpException('Unable to resolve the current directory');
474474
}
475475

476-
if (@$this->ftp->chdir($directory)) {
476+
if ($this->ftp->chdir($directory)) {
477477
$this->ftp->chdir($pwd);
478478
return true;
479479
}

src/FtpClient/FtpWrapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __call($function, array $arguments)
8282

8383
if (function_exists($function)) {
8484
array_unshift($arguments, $this->conn);
85-
return call_user_func_array($function, $arguments);
85+
return @call_user_func_array($function, $arguments);
8686
}
8787

8888
throw new FtpException("{$function} is not a valid FTP function");
@@ -98,7 +98,7 @@ public function __call($function, array $arguments)
9898
*/
9999
public function connect($host, $port = 21, $timeout = 90)
100100
{
101-
return ftp_connect($host, $port, $timeout);
101+
return @ftp_connect($host, $port, $timeout);
102102
}
103103

104104
/**
@@ -110,6 +110,6 @@ public function connect($host, $port = 21, $timeout = 90)
110110
*/
111111
public function ssl_connect($host, $port = 21, $timeout = 90)
112112
{
113-
return ftp_ssl_connect($host, $port, $timeout);
113+
return @ftp_ssl_connect($host, $port, $timeout);
114114
}
115115
}

0 commit comments

Comments
 (0)