From eb9f0da34eca3a7ed8fa8610a929081668c05bf5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 18 Apr 2026 20:17:25 +0000 Subject: [PATCH] Add directory existence check Add check to skip processing if directory doesn't exist. --- resources/switch.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/switch.php b/resources/switch.php index 8410fadd2..4c8b24e04 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -284,6 +284,11 @@ function save_var_xml() { return false; } + //skip if the directory doesn't exist + if (!file_exists($switch_conf_dir)) { + return false; + } + //open the vars.xml file $fout = fopen($switch_conf_dir."/vars.xml","w");