Skip to content

Commit

Permalink
SFTP: realpath('') produced an error
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed May 2, 2020
1 parent e29f5bd commit a07f5bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phpseclib/Net/SFTP.php
Expand Up @@ -778,7 +778,7 @@ function _realpath($path)
}
}

if ($path[0] != '/') {
if (!strlen($path) || $path[0] != '/') {
$path = $this->pwd . '/' . $path;
}

Expand Down

1 comment on commit a07f5bc

@terrafrost
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1474

Please sign in to comment.