From dfd57dfb897dd848dc7e434c36cd4885baabb73d Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 19 Mar 2015 22:39:43 -0500 Subject: [PATCH] SSH2: rm redundant code and make php4 compatable --- phpseclib/Net/SSH2.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 54184730..10ffd673 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -991,8 +991,6 @@ class Net_SSH2 $temp = ''; } - $read = array($this->fsock); - if ($this->curTimeout) { if ($this->curTimeout < 0) { $this->is_timeout = true; @@ -1000,7 +998,7 @@ class Net_SSH2 } $read = array($this->fsock); $write = $except = null; - $start = microtime(true); + $start = strtok(microtime(), ' ') + strtok(''); $sec = floor($this->curTimeout); $usec = 1000000 * ($this->curTimeout - $sec); // on windows this returns a "Warning: Invalid CRT parameters detected" error @@ -1009,7 +1007,7 @@ class Net_SSH2 $this->is_timeout = true; return false; } - $elapsed = microtime(true) - $start; + $elapsed = strtok(microtime(), ' ') + strtok('') - $start; $this->curTimeout-= $elapsed; }