From 9a61525f444e8c4fbfff44f2d7aa89715a14a7ae Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 11 Oct 2021 08:53:21 -0500 Subject: [PATCH] SSH2: rm unnecessary code --- phpseclib/Net/SSH2.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 59a2630e..f9577320 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3841,9 +3841,6 @@ class Net_SSH2 if ($client_channel == $channel && $this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_DATA) { return $data; } - if (!isset($this->channel_buffers[$channel])) { - $this->channel_buffers[$channel] = array(); - } $this->channel_buffers[$channel][] = chr($type) . $data; continue 2; @@ -3946,9 +3943,6 @@ class Net_SSH2 } extract(unpack('Nlength', $this->_string_shift($response, 4))); $data = $this->_string_shift($response, $length); - if (!isset($this->channel_buffers[$channel])) { - $this->channel_buffers[$channel] = array(); - } $this->channel_buffers[$channel][] = chr($type) . $data; return $this->_get_channel_packet($client_channel, $skip_extended); default: @@ -3990,9 +3984,6 @@ class Net_SSH2 if ($client_channel == $channel) { return $data; } - if (!isset($this->channel_buffers[$channel])) { - $this->channel_buffers[$channel] = array(); - } $this->channel_buffers[$channel][] = chr($type) . $data; break; case NET_SSH2_MSG_CHANNEL_CLOSE: