From f63010d915a6d338d1164d1343f6c4dcf2edebe6 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Wed, 14 Jun 2023 14:59:21 -0600 Subject: [PATCH] Fix new install loading music on hold --- app/music_on_hold/app_defaults.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/music_on_hold/app_defaults.php b/app/music_on_hold/app_defaults.php index 816c54ff5a..79d95d666a 100644 --- a/app/music_on_hold/app_defaults.php +++ b/app/music_on_hold/app_defaults.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2016 + Portions created by the Initial Developer are Copyright (C) 2016 - 2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -27,13 +27,13 @@ if ($domains_processed == 1) { //set the directory - if (is_array($_SESSION["switch"]["conf"])) { - $xml_dir = $_SESSION["switch"]["conf"]["dir"].'/autoload_configs'; + if (isset($_SESSION["switch"]["conf"])) { + $xml_dir = $_SESSION["switch"]["conf"].'/autoload_configs'; $xml_file = $xml_dir."/local_stream.conf"; } //rename the file - if (is_array($_SESSION["switch"]["conf"])) { + if (isset($_SESSION["switch"]["conf"])) { if (file_exists($xml_dir.'/local_stream.conf.xml')) { rename($xml_dir.'/local_stream.conf', $xml_dir.'/'.$xml_file); } @@ -43,7 +43,7 @@ if ($domains_processed == 1) { } //add the music_on_hold list to the database - if (is_array($_SESSION["switch"]["conf"])) { + if (isset($_SESSION["switch"]["conf"])) { $sql = "select count(music_on_hold_uuid) from v_music_on_hold; "; $database = new database; $num_rows = $database->select($sql, null, 'column');