From b66b71817c0c402b5d1994e13f2120d5ee955005 Mon Sep 17 00:00:00 2001 From: Faustin Date: Sat, 10 Sep 2022 15:49:54 +0200 Subject: [PATCH] scrutinizer in core/lib/ftp.lib.php: $localpath never defiened for ftp_get, added it and modify consequently file where the function is called --- htdocs/core/lib/ftp.lib.php | 5 +++-- htdocs/ftp/index.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/ftp.lib.php b/htdocs/core/lib/ftp.lib.php index 118c85e9b74..807bae63b0a 100644 --- a/htdocs/core/lib/ftp.lib.php +++ b/htdocs/core/lib/ftp.lib.php @@ -193,11 +193,12 @@ function dol_ftp_delete($connect_id, $file, $newsection) * Download a FTP file * * @param resource $connect_id Connection handler - * @param string $file File + * @param string $localfile The local file path + * @param string $file The remote file path * @param string $newsection $newsection * @return result */ -function dol_ftp_get($connect_id, $file, $newsection) +function dol_ftp_get($connect_id, $localfile, $file, $newsection) { global $conf; diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 857d41fc85b..6d06f501e8f 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -317,7 +317,7 @@ if ($action == 'download') { $newsection = $section; - $result = dol_ftp_get($connect_id, $file, $newsection); + $result = dol_ftp_get($connect_id, $localfile, $file, $newsection); if ($result) {