changed arguments for ssh2.sftp

Bugfix for newer versions of PHP such as PHP 7.0.32-0ubuntu0.16.04.1
The problem was caused by the bug listed here https://bugs.php.net/bug.php?id=73597
This commit is contained in:
Charles Luzzato
2018-11-01 18:51:54 +01:00
committed by Thomas Pike
parent a1bb1895e7
commit 13fb80e2b9

View File

@@ -410,7 +410,7 @@ function sync_server($id, $only_username = null, $preview = false) {
if(is_null($only_username) || $username == $only_username) {
try {
$remote_filename = "$keydir/$username";
$remote_entity = "ssh2.sftp://$sftp$remote_filename";
$remote_entity = "ssh2.sftp://" . intval($sftp) . $remote_filename;
$create = true;
if($keyfile['check']) {
$stream = ssh2_exec($connection, 'id '.escapeshellarg($username));