From 7611b33ecca787b13509fad1a66c380d8a1ff8b6 Mon Sep 17 00:00:00 2001 From: reliberate Date: Tue, 8 Dec 2015 11:24:47 -0700 Subject: [PATCH] Domain Edit/Create: Use file_exists instead of isset on recordings directory path check. --- core/domain_settings/domain_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/domain_settings/domain_edit.php b/core/domain_settings/domain_edit.php index 099c563458..870a2c9ad9 100644 --- a/core/domain_settings/domain_edit.php +++ b/core/domain_settings/domain_edit.php @@ -234,7 +234,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { } // rename switch/recordings/[domain] (folder) - if ( isset($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']) ) { + if ( file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']) ) { $switch_recordings_dir = str_replace("/".$_SESSION["domain_name"], "", $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']); if ( file_exists($switch_recordings_dir."/".$original_domain_name) ) { @rename($switch_recordings_dir."/".$original_domain_name, $switch_recordings_dir."/".$domain_name); // folder