Merge pull request #173 from h4cc/patch-1

Making Net_SFTP::chdir capable of handling the empty string.
This commit is contained in:
terrafrost 2013-11-20 07:29:16 -08:00
commit 187f40a247

View File

@ -635,6 +635,11 @@ class Net_SFTP extends Net_SSH2 {
return false;
}
if ($dir === '') {
$dir = './';
}
// Suffix a slash if needed
if ($dir[strlen($dir) - 1] != '/') {
$dir.= '/';
}