From a4c41f6ee40d3ff9b1430345c0df6b50f22e7232 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 1 Oct 2015 05:43:25 +0000 Subject: [PATCH] Updates: SSH2 Transport: Add a connection error when the SFTP subsystem cannot be initialized. Fixes #33478 Built from https://develop.svn.wordpress.org/trunk@34739 git-svn-id: http://core.svn.wordpress.org/trunk@34703 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-filesystem-ssh2.php | 6 +++++- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index bc978d5141..1b3a3b5964 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -130,7 +130,11 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { } } - $this->sftp_link = ssh2_sftp($this->link); + $this->sftp_link = ssh2_sftp( $this->link ); + if ( ! $this->sftp_link ) { + $this->errors->add( 'connect', sprintf( __( 'Failed to initialize a SFTP subsystem session with the SSH2 Server %1$s:%2$s' ), $this->options['hostname'], $this->options['port'] ) ); + return false; + } return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 77c4015e3e..61ad982cf4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34738'; +$wp_version = '4.4-alpha-34739'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.