1
0
mirror of https://github.com/danog/phpseclib.git synced 2025-01-22 13:01:59 +01:00

fix pre-php-5.4 syntax error

This commit is contained in:
terrafrost 2021-08-27 12:40:38 -05:00
parent 69dba39bc9
commit a25d3a75d3

View File

@ -674,7 +674,7 @@ class Net_SFTP extends Net_SSH2
*/
if (isset($this->extensions['versions']) && (!$this->preferredVersion || $this->preferredVersion != $this->version)) {
$versions = explode(',', $this->extensions['versions']);
$supported = [6, 5, 4];
$supported = array(6, 5, 4);
if ($this->preferredVersion) {
$supported = array_diff($supported, [$this->preferredVersion]);
array_unshift($supported, $this->preferredVersion);