mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-11 16:15:52 +00:00
Making Net_SFTP::chdir capable of handling the empty string.
Fixing a ugly notice when using the empty string as parameter for chdir: Notice: Uninitialized string offset: -1 in Net/SFTP.php line 617
This commit is contained in:
parent
6f56dfc80b
commit
9ea67f9edb
@ -635,7 +635,8 @@ class Net_SFTP extends Net_SSH2 {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($dir[strlen($dir) - 1] != '/') {
|
||||
// Suffix a slash
|
||||
if (!$dir || $dir[strlen($dir) - 1] != '/') {
|
||||
$dir.= '/';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user