diff --git a/app/sofia_global_settings/resources/classes/sofia_global_settings.php b/app/sofia_global_settings/resources/classes/sofia_global_settings.php index f7b61af285..2123828c2d 100644 --- a/app/sofia_global_settings/resources/classes/sofia_global_settings.php +++ b/app/sofia_global_settings/resources/classes/sofia_global_settings.php @@ -220,7 +220,7 @@ if (!class_exists('sofia_global_settings')) { //add copy to the description $array[$this->table][$x][$this->name.'_uuid'] = uuid(); $array[$this->table][$x]['global_setting_enabled'] = $row['global_setting_enabled']; - $array[$this->table][$x][$this->description_field] = trim($row[$this->description_field]).' ('.$text['label-copy'].')'; + $array[$this->table][$x][$this->description_field] = trim($row[$this->description_field] ?? '').trim(' ('.$text['label-copy'].')'); //increment the id $x++; @@ -249,4 +249,4 @@ if (!class_exists('sofia_global_settings')) { } } -?> +?> \ No newline at end of file diff --git a/app/sofia_global_settings/sofia_global_setting_edit.php b/app/sofia_global_settings/sofia_global_setting_edit.php index f4152d6d6c..e6ae3744d9 100644 --- a/app/sofia_global_settings/sofia_global_setting_edit.php +++ b/app/sofia_global_settings/sofia_global_setting_edit.php @@ -1,4 +1,28 @@ + Portions created by the Initial Developer are Copyright (C) 2021-2023 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ //set the include path $conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE); @@ -41,7 +65,7 @@ if (!empty($_POST)) { $global_setting_name = $_POST["global_setting_name"]; $global_setting_value = $_POST["global_setting_value"]; - $global_setting_enabled = $_POST["global_setting_enabled"]; + $global_setting_enabled = $_POST["global_setting_enabled"] ?? "false"; $global_setting_description = $_POST["global_setting_description"]; } @@ -158,7 +182,7 @@ } //set the defaults - if (empty($global_setting_enabled)) { $global_setting_enabled = true; } + if (empty($global_setting_enabled)) { $global_setting_enabled = 'true'; } //create token $object = new token; @@ -232,7 +256,7 @@ echo "\n"; if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') { echo " \n"; }