Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions FtpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ private function connection()
return $this->connection;
}

if ($this->connectivityChecker->isConnected($this->connection) === false) {
$this->connection = false;
goto start;
}
if ($this->connectivityChecker->isConnected($this->connection) === false) {
$this->connection = false;
goto start;
}

ftp_chdir($this->connection, $this->rootDirectory);

Expand Down
3 changes: 2 additions & 1 deletion NoopCommandConnectivityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public function isConnected($connection): bool
}
// @codeCoverageIgnoreEnd

$responseCode = $response ? (int) preg_replace('/\D/', '', implode('', $response)) : false;
//$responseCode = $response ? (int) preg_replace('/\D/', '', implode('', $response)) : false;
$responseCode = $response ? (int) substr(implode('', $response), 0, 3) : false;

return $responseCode === 200;
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> ⚠️ this is a sub-split, for pull requests and issues, visit: https://github.com/thephpleague/flysystem

```bash
composer require league/flysystem-ftp
composer require dalimov/flysystem-ftp
```

View the [documentation](https://flysystem.thephpleague.com/docs/adapter/ftp/).