From 89a1668cf6decdd111f1f43733e59a84fe83fc40 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 25 May 2023 14:15:19 -0600 Subject: [PATCH] A few more updates for PHP 8.1 --- app/email_templates/email_template_edit.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/email_templates/email_template_edit.php b/app/email_templates/email_template_edit.php index fd8bab8815..d698f73109 100644 --- a/app/email_templates/email_template_edit.php +++ b/app/email_templates/email_template_edit.php @@ -43,7 +43,7 @@ $text = $language->get(); //action add or update - if (is_uuid($_REQUEST["id"])) { + if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) { $action = "update"; $email_template_uuid = $_REQUEST["id"]; } @@ -51,8 +51,18 @@ $action = "add"; } +//set the defaults + $template_language = ''; + $template_category = ''; + $template_subcategory = ''; + $template_subject = ''; + $template_body = ''; + $template_type = ''; + $template_enabled = ''; + $template_description = ''; + //get http post variables and set them to php variables - if (count($_POST) > 0) { + if (!empty($_POST)) { $domain_uuid = $_POST["domain_uuid"]; $template_language = $_POST["template_language"]; $template_category = $_POST["template_category"];