mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-13 18:02:58 +00:00
fix PHP <5.4 compatability
This commit is contained in:
parent
49e6bf3762
commit
ad7a7d5c8f
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user