diff --git a/rule/ftpsyncfiles/rule_class.php b/rule/ftpsyncfiles/rule_class.php index c6dc45c6..bd32fef4 100644 --- a/rule/ftpsyncfiles/rule_class.php +++ b/rule/ftpsyncfiles/rule_class.php @@ -75,7 +75,7 @@ class datalynx_rule_ftpsyncfiles extends datalynx_rule_base { * @var mixed */ private array $sftpsetting; - private int $filefieldid; + private ?int $filefieldid; private array $files; /** @@ -86,12 +86,14 @@ class datalynx_rule_ftpsyncfiles extends datalynx_rule_base { */ public function __construct($df = 0, $rule = 0) { parent::__construct($df, $rule); - $this->sftpsetting = unserialize($this->rule->param2); - $this->sftpserver = $this->sftpsetting['sftpserver']; - $this->sftpport = $this->sftpsetting['sftpport']; - $this->sftpusername = $this->sftpsetting['sftpusername']; - $this->sftppassword = $this->sftpsetting['sftppassword']; - $this->sftppath = $this->sftpsetting['sftppath']; + if (isset($this->rule->param2)) { + $this->sftpsetting = unserialize($this->rule->param2); + $this->sftpserver = $this->sftpsetting['sftpserver']; + $this->sftpport = $this->sftpsetting['sftpport']; + $this->sftpusername = $this->sftpsetting['sftpusername']; + $this->sftppassword = $this->sftpsetting['sftppassword']; + $this->sftppath = $this->sftpsetting['sftppath']; + } $this->matchingfield = $this->rule->param7; $this->teammemberfieldid = $this->rule->param8; $this->authorid = $this->rule->param9;