fix PHP <5.4 compatability

This commit is contained in:
terrafrost 2023-02-10 12:20:12 -06:00
parent 49e6bf3762
commit ad7a7d5c8f
2 changed files with 2 additions and 2 deletions

View File

@ -923,7 +923,7 @@ class SFTP extends SSH2
}
$parts = explode('/', $path);
$afterPWD = $beforePWD = [];
$afterPWD = $beforePWD = array();
foreach ($parts as $part) {
switch ($part) {
//case '': // some SFTP servers /require/ double /'s. see https://github.com/phpseclib/phpseclib/pull/1137

View File

@ -2745,7 +2745,7 @@ class SSH2
$publickey['n']
);
$algos = ['rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa'];
$algos = array('rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa');
if (isset($this->preferred['hostkey'])) {
$algos = array_intersect($this->preferred['hostkey'], $algos);
}