From dccb0e5dc4a3653afb73bf8530664ab2a9e13886 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 14 Jun 2016 11:06:29 -0600 Subject: [PATCH] Update app_defaults.php Ensure the values are reset after each loop through local_stream.con.xml attributes. --- app/music_on_hold/app_defaults.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/music_on_hold/app_defaults.php b/app/music_on_hold/app_defaults.php index 90c5d27758..962c4a01f0 100644 --- a/app/music_on_hold/app_defaults.php +++ b/app/music_on_hold/app_defaults.php @@ -64,6 +64,7 @@ $name = $p['@attributes']['name']; $name = str_replace("-", "_", $name); $$name = $p['@attributes']['value']; + $attributes[] = $name; } //insert the data into the database @@ -94,6 +95,11 @@ //echo $sql."\n"; $db->exec(check_sql($sql)); unset($sql); + + //unset the attribute variables + foreach ($attributes as $value) { + unset($$value); + } } //rename the file @@ -104,4 +110,4 @@ } -?> \ No newline at end of file +?>