php 8.1 changes (#6719)

* Update email_template_edit.php

* Update menu.php

* Update menu_edit.php

* Update number_translations.php

* Update number_translations.php

* Update email_templates.php

* Update email_templates.php

* Update setting_edit.php

* Update call_block.php

* Update call_block_edit.php

* Update email_template_edit.php

* Update call_block.php
This commit is contained in:
Alex
2023-05-25 12:38:32 -06:00
committed by GitHub
parent e3dce560cf
commit 5bb29763ad
8 changed files with 126 additions and 107 deletions
+6 -6
View File
@@ -49,7 +49,7 @@
//get the number of rows in v_extensions
$sql = " select count(*) from v_settings ";
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
$num_rows = $database->select($sql, $parameters ?? '', 'column');
//set the action
$action = $num_rows == 0 ? "add" : "update";
@@ -103,7 +103,7 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) {
}
//add or update the database
if ($_POST["persistformvar"] != "true") {
if (empty($_POST["persistformvar"])) {
if (permission_exists('setting_edit')) {
//build array
$array['settings'][0]['setting_uuid'] = $action == "add" ? uuid() : $setting_uuid;
@@ -151,11 +151,11 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) {
}
//pre-populate the form
if ($_POST["persistformvar"] != "true") {
if (empty($_POST["persistformvar"])) {
$sql = "select * from v_settings ";
$database = new database;
$row = $database->select($sql, null, 'row');
if (is_array($row) && @sizeof($row) != 0) {
if (!empty($row)) {
$setting_uuid = $row['setting_uuid'];
$event_socket_ip_address = $row["event_socket_ip_address"];
$event_socket_port = $row["event_socket_port"];
@@ -242,7 +242,7 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) {
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='event_socket_acl' id='event_socket_acl' maxlength='50' value=\"".escape($event_socket_acl)."\">\n";
echo "<br />\n";
echo $text['description-event_socket_acl']."\n";
echo !empty($text['description-event_socket_acl'])."\n";
echo "</td>\n";
echo "</tr>\n";
@@ -363,4 +363,4 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) {
//show the footer
require_once "resources/footer.php";
?>
?>