From 1c4bf2066e3b90cbc4fd58c158b7c45114689f0c Mon Sep 17 00:00:00 2001 From: fusionate Date: Sat, 27 May 2023 18:23:38 +0000 Subject: [PATCH] Event Guard - Edit: Updates for PHP 8.1 --- app/event_guard/event_guard_log_edit.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/event_guard/event_guard_log_edit.php b/app/event_guard/event_guard_log_edit.php index bedd9c5758..22bf3ee915 100644 --- a/app/event_guard/event_guard_log_edit.php +++ b/app/event_guard/event_guard_log_edit.php @@ -1,6 +1,6 @@ + Copyright (C) 2022-2023 Mark J Crane Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 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 - if (is_array($_POST)) { + if (!empty($_POST) && is_array($_POST)) { $hostname = $_POST["hostname"]; $log_date = $_POST["log_date"]; $filter = $_POST["filter"]; @@ -74,7 +74,7 @@ } //process the http post data by submitted action - if ($_POST['action'] != '' && !empty($_POST['action'])) { + if (!empty($_POST['action'])) { //prepare the array(s) //send the array to the database class @@ -164,7 +164,7 @@ } //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 .= " event_guard_log_uuid, "; $sql .= " hostname, "; @@ -322,4 +322,4 @@ //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file