From 2608f1ffadf9f1b9b3a0877140616e763d9b3514 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Tue, 23 May 2023 08:22:23 -0600 Subject: [PATCH] Return immediately if switch conf dir is empty --- resources/switch.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/switch.php b/resources/switch.php index e1c992b490..b78cc1c819 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -365,6 +365,11 @@ function save_var_xml() { if (is_array($_SESSION['switch']['conf'])) { global $config, $domain_uuid; + //skip this function if the conf directory is empty + if (empty($_SESSION['switch']['conf']['dir'])) { + return false; + } + //open the vars.xml file $fout = fopen($_SESSION['switch']['conf']['dir']."/vars.xml","w");