Fixing 'Undefined array key' E_WARNING

This commit is contained in:
vansari 2022-10-21 10:46:02 +02:00
parent e798c6052e
commit 22311b1f0a

View File

@ -3924,7 +3924,7 @@ class SSH2
protected function send_channel_packet(int $client_channel, string $data): void protected function send_channel_packet(int $client_channel, string $data): void
{ {
while (strlen($data)) { while (strlen($data)) {
if (!$this->window_size_client_to_server[$client_channel]) { if (!($this->window_size_client_to_server[$client_channel] ?? false)) {
$this->bitmap ^= self::MASK_WINDOW_ADJUST; $this->bitmap ^= self::MASK_WINDOW_ADJUST;
// using an invalid channel will let the buffers be built up for the valid channels // using an invalid channel will let the buffers be built up for the valid channels
$this->get_channel_packet(-1); $this->get_channel_packet(-1);