mirror of
https://github.com/danog/tgseclib.git
synced 2025-01-21 21:41:14 +01:00
SFTP: don't do $dir[-1] check if $dir === ''
This commit is contained in:
parent
187f40a247
commit
fcfc0e2c00
@ -635,12 +635,11 @@ class Net_SFTP extends Net_SSH2 {
|
||||
return false;
|
||||
}
|
||||
|
||||
// assume current dir if $dir is empty
|
||||
if ($dir === '') {
|
||||
$dir = './';
|
||||
}
|
||||
|
||||
// Suffix a slash if needed
|
||||
if ($dir[strlen($dir) - 1] != '/') {
|
||||
// suffix a slash if needed
|
||||
} elseif ($dir[strlen($dir) - 1] != '/') {
|
||||
$dir.= '/';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user