From 1c24333b57483370db10f1cb5257ddf1b6c799c6 Mon Sep 17 00:00:00 2001 From: Hystepik Date: Tue, 11 Feb 2025 14:46:46 +0100 Subject: [PATCH] fix Ci --- htdocs/website/index.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index bc96a9213d4..9f003cd8a3b 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1958,14 +1958,16 @@ if ($action == "updatesecurity" && $usercanedit && GETPOST("btn_WEBSITE_SECURITY } if (!$error) { $directivetype = $directivesarray[$directivecsp]["data-directivetype"]; - $sourcetype = $sourcesarray[$directivetype][$sourcecsp]["data-sourcetype"]; + if (isset($sourcecsp)) { + $sourcetype = $sourcesarray[$directivetype][$sourcecsp]["data-sourcetype"]; + } $securityspstring = ""; - if ($sourcetype == "data") { + if (isset($sourcetype) && $sourcetype == "data") { if (empty($forceCSPArr[$directivecsp]["data"])) { $forceCSPArr[$directivecsp]["data"] = array(); } $forceCSPArr[$directivecsp]["data"][] = $sourcedatacsp; - } elseif ($sourcetype == "input") { + } elseif (isset($sourcetype) && $sourcetype == "input") { if (empty($forceCSPArr[$directivecsp])) { $forceCSPArr[$directivecsp] = array(); } @@ -1984,10 +1986,12 @@ if ($action == "updatesecurity" && $usercanedit && GETPOST("btn_WEBSITE_SECURITY } else { $directivetype = $directivesarray[$directive]["data-directivetype"]; $sourcetype = $sourcesarray[$directivetype][$source]["data-sourcetype"]; - if ($sourcetype == "quoted") { - $sourcestring .= " '".$source."'"; - } elseif ($directivetype != "none") { - $sourcestring .= " ".$source; + if (isset($sourcetype)) { + if ($sourcetype == "quoted") { + $sourcestring .= " '".$source."'"; + } elseif ($directivetype != "none") { + $sourcestring .= " ".$source; + } } } }