Skip to content

Commit

Permalink
Merge pull request #7 from RonanL/RonanL-check-ftp_connect-success
Browse files Browse the repository at this point in the history
Check if FTP connection succeeded
  • Loading branch information
danielec7 authored Nov 2, 2016
2 parents 370e6d0 + b815e22 commit 76e6b1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public function __call($name, $args)
} catch (\ErrorException $e) {
throw new FtpException($e->getMessage());
}
if (!is_resource($this->resource)) {
throw new FtpException("An error occured while trying to connect to FTP server.");
}
$result = null;

} elseif (!is_resource($this->resource)) {
Expand Down

0 comments on commit 76e6b1c

Please sign in to comment.