From 9705cbbc26b3c298848ca360857a6adf3dac3225 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 23 Mar 2023 12:23:43 -0500 Subject: [PATCH] SSH/SFTP: make define_array static --- phpseclib/Net/SFTP.php | 2 +- phpseclib/Net/SSH2.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 1c675a6e..f02a321a 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -500,7 +500,7 @@ class SFTP extends SSH2 8 => 'NET_SFTP_TYPE_BLOCK_DEVICE', 9 => 'NET_SFTP_TYPE_FIFO' ]; - $this->define_array( + self::define_array( $this->packet_types, $this->status_codes, $this->attributes, diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index f680a3b3..91af6098 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1157,7 +1157,7 @@ class SSH2 1 => 'NET_SSH2_EXTENDED_DATA_STDERR' ]; - $this->define_array( + self::define_array( $this->message_numbers, $this->disconnect_reasons, $this->channel_open_failure_reasons, @@ -4506,7 +4506,7 @@ class SSH2 * @param mixed[] ...$args * @access protected */ - protected function define_array(...$args) + protected static function define_array(...$args) { foreach ($args as $arg) { foreach ($arg as $key => $value) {