Make WordPress Core

Changeset 34739


Ignore:
Timestamp:
10/01/2015 05:42:20 AM (10 years ago)
Author:
dd32
Message:

Updates: SSH2 Transport: Add a connection error when the SFTP subsystem cannot be initialized.
Fixes #33478

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php

    r34738 r34739  
    131131        }
    132132
    133         $this->sftp_link = ssh2_sftp($this->link);
     133        $this->sftp_link = ssh2_sftp( $this->link );
     134        if ( ! $this->sftp_link ) {
     135            $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'] ) );
     136            return false;
     137        }
    134138
    135139        return true;
Note: See TracChangeset for help on using the changeset viewer.