From eb1bbdbc95ef00011091d167626fe81ed3a15b6e Mon Sep 17 00:00:00 2001 From: Ortwin Pinke Date: Fri, 23 Aug 2024 15:01:17 +0200 Subject: [PATCH] token use not allowed in modules --- php/cl_contactform_output.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/php/cl_contactform_output.php b/php/cl_contactform_output.php index 5560765..1db229c 100644 --- a/php/cl_contactform_output.php +++ b/php/cl_contactform_output.php @@ -1,6 +1,4 @@ unravel($this->suppress('sent')); $this->generateEmailMessage(); - $phpMailer = new PHPMailer(true); + $phpMailer = new \PHPMailer\PHPMailer\PHPMailer(true); $phpMailer->isMail(); $phpMailer->isHTML(false); $phpMailer->CharSet = "UTF-8"; @@ -53,7 +51,7 @@ class w3form if ($phpMailer->send()) { return true; } - } catch (Exception $e) { + } catch (\PHPMailer\PHPMailer\Exception $e) { echo $e->errorMessage(); } return false; @@ -178,11 +176,7 @@ class w3form $style = ''; $value = ''; - if (!empty($attribute['id'])) { - $parameter = 'id="' . $attribute['id'] . '"'; - } else { - $parameter = 'id="' . $attribute['name'] . '"'; - } + $parameter = empty($attribute['id']) ? 'id="' . $attribute['name'] . '"' : 'id="' . $attribute['id'] . '"'; $parameter .= ' name="' . $attribute['name'] . '"';