From 915d1d8ca96b4f7dfe973a20f256fd31fb335ea3 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 18 May 2021 22:00:59 -0500 Subject: [PATCH] SSH2: fix PHP7.4 errors about accessing bool as string --- phpseclib/Net/SSH2.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 6fbc3f31..82fba2fd 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3548,6 +3548,10 @@ class Net_SSH2 // only called when we've already logged in if (($this->bitmap & NET_SSH2_MASK_CONNECTED) && $this->isAuthenticated()) { + if (is_bool($payload)) { + return $payload; + } + switch (ord($payload[0])) { case NET_SSH2_MSG_CHANNEL_REQUEST: if (strlen($payload) == 31) {