From c02713a3bd9afff1807012b3cc003d1b4a6f3e7e Mon Sep 17 00:00:00 2001 From: markjcrane Date: Sun, 6 Dec 2015 10:13:22 -0700 Subject: [PATCH] Use set and unset instead. --- app/dialplan/dialplan_copy.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/dialplan/dialplan_copy.php b/app/dialplan/dialplan_copy.php index 1160fc769f..8d295a4b7f 100644 --- a/app/dialplan/dialplan_copy.php +++ b/app/dialplan/dialplan_copy.php @@ -83,7 +83,7 @@ else { case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": //outbound routes case "4b821450-926b-175a-af93-a03c441818b1": //time conditions default: - $app_uuid = null; + unset($app_uuid); } //copy the dialplan @@ -104,11 +104,11 @@ else { $sql .= "("; $sql .= "'".$domain_uuid."', "; $sql .= "'$dialplan_uuid', "; - if ($app_uuid == null) { - $sql .= "null, "; + if (isset($app_uuid)) { + $sql .= "'$app_uuid', "; } else { - $sql .= "'$app_uuid', "; + $sql .= "null, "; } $sql .= "'".$dialplan_name."-copy', "; $sql .= "'$dialplan_order', ";