1
0
mirror of https://github.com/danog/tgseclib.git synced 2025-01-22 05:51:20 +01:00

SSH2: fix if statement for conditional _connect() call

This commit is contained in:
terrafrost 2014-08-05 19:30:14 -05:00
parent dffef50838
commit 5b019b22d9

View File

@ -1,5 +1,4 @@
<?php <?php
/** /**
* Pure-PHP implementation of SSHv2. * Pure-PHP implementation of SSHv2.
* *
@ -1804,9 +1803,11 @@ class Net_SSH2
*/ */
function _login($username) function _login($username)
{ {
if (!($this->bitmap & NET_SSH2_MASK_CONSTRUCTOR) || !$this->_connect()) { if (!($this->bitmap & NET_SSH2_MASK_CONSTRUCTOR)) {
if (!$this->_connect()) {
return false; return false;
} }
}
$args = array_slice(func_get_args(), 1); $args = array_slice(func_get_args(), 1);
if (empty($args)) { if (empty($args)) {