From 96c5094dc1815e38783707172a09061e0b7c8dca Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 22 Mar 2014 01:12:31 +0000 Subject: [PATCH] skip saving the gateway xml if the directory is not set. --- resources/switch.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/switch.php b/resources/switch.php index 647ed80a3b..7287529a85 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -1770,6 +1770,11 @@ function filename_safe($filename) { function save_gateway_xml() { + //skip saving the gateway xml if the directory is not set + if (strlen($_SESSION['switch']['sip_profiles']['dir']) == 0) { + return; + } + //declare the global variables global $db, $domain_uuid, $config;