From a77eac9adf96cdb2dcb7e0142faf6f2b7f8b7225 Mon Sep 17 00:00:00 2001 From: TLWebdesign Date: Sat, 16 Sep 2023 01:00:56 +0200 Subject: [PATCH] Update Ftp.php Fix problem with parse_str missing mandatory result parameter since php 8.0.0 --- .../src/Componentbuilder/Server/Ftp.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php index 792332f89..7d184ea26 100644 --- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php +++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server/Ftp.php @@ -114,12 +114,13 @@ class Ftp implements Serverinterface // make sure we have a string and it is not default or empty if (StringHelper::check($this->details->signature)) { - // turn into variables - parse_str((string) $this->details->signature); + // turn into array of variables + $signature = []; + parse_str((string) $this->details->signature, $signature); // set options - if (isset($options) && ArrayHelper::check($options)) + if (isset($signature['options']) && ArrayHelper::check($signature['options'])) { - foreach ($options as $o__p0t1on => $vAln3) + foreach ($signature['options'] as $o__p0t1on => $vAln3) { if ('timeout' === $o__p0t1on) { @@ -136,10 +137,10 @@ class Ftp implements Serverinterface $options = []; } // get ftp object - if (isset($host) && $host != 'HOSTNAME' && - isset($port) && $port != 'PORT_INT' && - isset($username) && $username != 'user@name.com' && - isset($password) && $password != 'password') + if (isset($signature['host']) && $signature['host'] != 'HOSTNAME' && + isset($signature['port']) && $signature['port'] != 'PORT_INT' && + isset($signature['username']) && $signature['username'] != 'user@name.com' && + isset($signature['password']) && $signature['password'] != 'password') { // this is a singleton return FtpClient::getInstance($host, $port, $options, $username, $password); -- 2.45.2