Skip to content
Snippets Groups Projects
Commit 558ad0ce authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2242405 by mikebarkas, jlbellido | alexpott: Fixed...

Issue #2242405 by mikebarkas, jlbellido | alexpott: Fixed FileTransfer::connect is protected yet the implementations are public and this is relied upon.
parent 2aa98311
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -110,7 +110,7 @@ function __get($name) {
/**
* Connects to the server.
*/
abstract protected function connect();
abstract public function connect();
/**
* Copies a directory.
......
......@@ -15,7 +15,7 @@ class Local extends FileTransfer implements ChmodInterface {
/**
* Implements Drupal\Core\FileTransfer\FileTransfer::connect().
*/
function connect() {
public function connect() {
// No-op
}
......
......@@ -26,7 +26,7 @@ function __construct($jail, $username, $password, $hostname = "localhost", $port
/**
* Implements Drupal\Core\FileTransfer\FileTransfer::connect().
*/
function connect() {
public function connect() {
$this->connection = @ssh2_connect($this->hostname, $this->port);
if (!$this->connection) {
throw new FileTransferException('SSH Connection failed to @host:@port', NULL, array('@host' => $this->hostname, '@port' => $this->port));
......
......@@ -32,7 +32,7 @@ static function factory($jail, $settings) {
return new TestFileTransfer($jail, $settings['username'], $settings['password'], $settings['hostname'], $settings['port']);
}
function connect() {
public function connect() {
$this->connection = new MockTestConnection();
$this->connection->connectionString = 'test://' . urlencode($this->username) . ':' . urlencode($this->password) . "@$this->host:$this->port/";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment