From 1a942620b3993d525d7ca8f73db20924c6770822 Mon Sep 17 00:00:00 2001 From: vgogolin Date: Fri, 29 Oct 2021 18:19:20 -0700 Subject: [PATCH 1/2] Backward compatibility with old PHP versions Fix for PHP Parse error: syntax error, unexpected '[' in /vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 3558 --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index a641e9d3..524b895b 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3572,7 +3572,7 @@ class Net_SSH2 $fdict = boolval($flg & 0x20); $flevel = ($flg & 0xC0) >> 6; - $this->decompress_context = inflate_init(ZLIB_ENCODING_RAW, ['window' => $cinfo + 8]); + $this->decompress_context = inflate_init(ZLIB_ENCODING_RAW, array('window' => $cinfo + 8)); $payload = substr($payload, 2); } if ($this->decompress_context) { From 878526d7c9fe634e420df185051e37bc1290c669 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 30 Oct 2021 18:16:23 -0500 Subject: [PATCH 2/2] SSH2: CS adjustments --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 0902cdea..df8288c4 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3429,7 +3429,7 @@ class SSH2 $fdict = boolval($flg & 0x20); $flevel = ($flg & 0xC0) >> 6; - $this->decompress_context = inflate_init(ZLIB_ENCODING_RAW, array('window' => $cinfo + 8)); + $this->decompress_context = inflate_init(ZLIB_ENCODING_RAW, ['window' => $cinfo + 8]); $payload = substr($payload, 2); } if ($this->decompress_context) {