From a7d038830c32a0004764ad552639ec63ed913ac9 Mon Sep 17 00:00:00 2001 From: Rubens Matrono Date: Thu, 13 Jun 2019 15:16:47 +0200 Subject: [PATCH] fix array_merge(): Argument #1 is not an array --- phpseclib/Net/SFTP.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index a6216285..14a63e18 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -897,6 +897,7 @@ class Net_SFTP extends Net_SSH2 } if (is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $value)))) { $temp = $this->_nlist_helper($dir . '/' . $value, true, $relativeDir . $value . '/'); + $temp = is_array($temp) ? $temp : array(); $result = array_merge($result, $temp); } else { $result[] = $relativeDir . $value;