diff --git a/app/dialplan_inbound/dialplan_inbound_add.php b/app/dialplan_inbound/dialplan_inbound_add.php
index dc40e625c9..0e20dafc65 100644
--- a/app/dialplan_inbound/dialplan_inbound_add.php
+++ b/app/dialplan_inbound/dialplan_inbound_add.php
@@ -48,10 +48,15 @@
$language = new text;
$text = $language->get();
+//set the defaults
+ $dialplan_name = '';
+ $dialplan_description = '';
+ $limit = '';
+
//get the http get values and set them as php variables
- $order_by = $_GET["order_by"];
- $order = $_GET["order"];
- $action = $_GET["action"];
+ $order_by = $_GET["order_by"] ?? '';
+ $order = $_GET["order"] ?? '';
+ $action = $_GET["action"] ?? '';
//initialize the destinations object
$destination = new destinations;
@@ -710,7 +715,7 @@
}
echo "\n";
echo "
\n";
- echo $destination->select('dialplan', 'action_1', $action_1);
+ echo $destination->select('dialplan', 'action_1', $action_1 ?? null);
echo " | \n";
echo "\n";
diff --git a/app/dialplan_outbound/dialplan_outbound_add.php b/app/dialplan_outbound/dialplan_outbound_add.php
index bbed56da0c..191659220a 100644
--- a/app/dialplan_outbound/dialplan_outbound_add.php
+++ b/app/dialplan_outbound/dialplan_outbound_add.php
@@ -50,6 +50,13 @@
$language = new text;
$text = $language->get();
+//set the defaults
+ $prefix_number = '';
+ $dialplan_description = '';
+ $limit = '';
+ $accountcode = '';
+ $toll_allow = '';
+
//get the http post values and set theme as php variables
if (!empty($_POST)) {
//set the variables
@@ -1270,7 +1277,7 @@ function type_onchange(dialplan_detail_type) {
echo " \n";
echo " \n";
echo "
\n";
- echo $text['description-enable-pin_numbers']."\n";
+ //echo $text['description-enable-pin_numbers']."\n";
echo "\n";
echo "\n";
}
@@ -1337,7 +1344,7 @@ function type_onchange(dialplan_detail_type) {
echo "";
echo "
";
- if ($action == "update") {
+ if (!empty($action) && $action == "update") {
echo "\n";
}
echo "\n";
diff --git a/app/modules/modules.php b/app/modules/modules.php
index fbabe12f65..a9a7d73535 100644
--- a/app/modules/modules.php
+++ b/app/modules/modules.php
@@ -244,7 +244,7 @@
}
else {
echo " \n";
- echo $row['module_enabled'] == 'true' ? "".$text['label-stopped']."" : $text['label-stopped']." ".escape($notice);
+ echo $row['module_enabled'] == 'true' ? "".$text['label-stopped']."" : $text['label-stopped']." ".escape($notice ?? null);
echo " | \n";
if (permission_exists('module_edit')) {
echo " ";
diff --git a/app/sip_profiles/sip_profile_edit.php b/app/sip_profiles/sip_profile_edit.php
index 6293a7bd98..38240674dc 100644
--- a/app/sip_profiles/sip_profile_edit.php
+++ b/app/sip_profiles/sip_profile_edit.php
@@ -305,6 +305,7 @@
$parameters['sip_profile_uuid'] = $sip_profile_uuid;
$database = new database;
$sip_profile_settings = $database->select($sql, $parameters, 'all');
+ if (empty($sip_profile_settings)) { $sip_profile_settings = []; }
unset($sql, $parameters);
//add an empty row
@@ -324,6 +325,7 @@
$parameters['sip_profile_uuid'] = $sip_profile_uuid;
$database = new database;
$sip_profile_domains = $database->select($sql, $parameters, 'all');
+ if (empty($sip_profile_domains)) { $sip_profile_domains = []; }
unset($sql, $parameters);
//add an empty row
diff --git a/core/dashboard/dashboard_edit.php b/core/dashboard/dashboard_edit.php
index a18985bc1b..eea107c71e 100644
--- a/core/dashboard/dashboard_edit.php
+++ b/core/dashboard/dashboard_edit.php
@@ -43,6 +43,17 @@
$language = new text;
$text = $language->get();
+//set the defaults
+ $dashboard_name = '';
+ $dashboard_path = '';
+ $dashboard_groups = [];
+ $dashboard_column_span = '';
+ $dashboard_details_state = '';
+ $dashboard_order = '';
+ $dashboard_enabled = 'false';
+ $dashboard_description = '';
+ $dashboard_uuid = '';
+
//action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
@@ -224,7 +235,7 @@
}
//get the child data
- if (is_uuid($dashboard_uuid)) {
+ if (!empty($dashboard_uuid) && is_uuid($dashboard_uuid)) {
$sql = "select ";
$sql .= " dashboard_group_uuid, ";
$sql .= " group_uuid ";
@@ -264,7 +275,7 @@
$sql = "select * from v_dashboard_groups as x, v_groups as g ";
$sql .= "where x.dashboard_uuid = :dashboard_uuid ";
$sql .= "and x.group_uuid = g.group_uuid ";
- $parameters['dashboard_uuid'] = $dashboard_uuid;
+ $parameters['dashboard_uuid'] = $dashboard_uuid ?? '';
$database = new database;
$dashboard_groups = $database->select($sql, $parameters, 'all');
unset ($sql, $parameters);
|