From a19e2a0d215d151f819ada053f29bc5d69a15073 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 17 Jul 2015 13:08:24 -0500 Subject: [PATCH] SSH2: move where $host is defined --- phpseclib/Net/SSH2.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index daa77557..d5f15f23 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1022,14 +1022,13 @@ class Net_SSH2 $this->curTimeout = $this->timeout; - $host = $this->host . ':' . $this->port; - $this->last_packet = strtok(microtime(), ' ') + strtok(''); // == microtime(true) in PHP5 if (!is_resource($this->fsock)) { $start = strtok(microtime(), ' ') + strtok(''); // http://php.net/microtime#61838 $this->fsock = @fsockopen($this->host, $this->port, $errno, $errstr, $this->curTimeout); if (!$this->fsock) { + $host = $this->host . ':' . $this->port; user_error(rtrim("Cannot connect to $host. Error $errno. $errstr")); return false; }