From 5b019b22d90c9110d3faedb76814e175276b3e4f Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 5 Aug 2014 19:30:14 -0500 Subject: [PATCH] SSH2: fix if statement for conditional _connect() call --- phpseclib/Net/SSH2.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 5274aee4..af88fb0a 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1,5 +1,4 @@ bitmap & NET_SSH2_MASK_CONSTRUCTOR) || !$this->_connect()) { - return false; + if (!($this->bitmap & NET_SSH2_MASK_CONSTRUCTOR)) { + if (!$this->_connect()) { + return false; + } } $args = array_slice(func_get_args(), 1);