From a07f5bc6a27519df2d227f7b2ba6c5ec6813f280 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 1 May 2020 21:34:44 -0500 Subject: [PATCH] SFTP: realpath('') produced an error --- phpseclib/Net/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index e39fabed..59c760ba 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -778,7 +778,7 @@ class Net_SFTP extends Net_SSH2 } } - if ($path[0] != '/') { + if (!strlen($path) || $path[0] != '/') { $path = $this->pwd . '/' . $path; }