Event Guard - Edit: Updates for PHP 8.1

This commit is contained in:
fusionate 2023-05-27 18:23:38 +00:00
parent 5d75490eab
commit 1c4bf2066e
No known key found for this signature in database
1 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
Copyright (C) 2022 Mark J Crane <markjcrane@fusionpbx.com> Copyright (C) 2022-2023 Mark J Crane <markjcrane@fusionpbx.com>
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
@ -52,7 +52,7 @@
} }
//get http post variables and set them to php variables //get http post variables and set them to php variables
if (is_array($_POST)) { if (!empty($_POST) && is_array($_POST)) {
$hostname = $_POST["hostname"]; $hostname = $_POST["hostname"];
$log_date = $_POST["log_date"]; $log_date = $_POST["log_date"];
$filter = $_POST["filter"]; $filter = $_POST["filter"];
@ -74,7 +74,7 @@
} }
//process the http post data by submitted action //process the http post data by submitted action
if ($_POST['action'] != '' && !empty($_POST['action'])) { if (!empty($_POST['action'])) {
//prepare the array(s) //prepare the array(s)
//send the array to the database class //send the array to the database class
@ -164,7 +164,7 @@
} }
//pre-populate the form //pre-populate the form
if (is_array($_GET) && $_POST["persistformvar"] != "true") { if (!empty($_GET) && is_array($_GET) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) {
$sql = "select "; $sql = "select ";
$sql .= " event_guard_log_uuid, "; $sql .= " event_guard_log_uuid, ";
$sql .= " hostname, "; $sql .= " hostname, ";