From 13fb80e2b9108b4c7a3e308ccee7f72c3e6abe55 Mon Sep 17 00:00:00 2001 From: Charles Luzzato Date: Thu, 1 Nov 2018 18:51:54 +0100 Subject: [PATCH] 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 --- scripts/sync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sync.php b/scripts/sync.php index c4258c5..208818b 100755 --- a/scripts/sync.php +++ b/scripts/sync.php @@ -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));