From c19983d98523e8d511d971ccaf9de0b4927a4395 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Wed, 12 Jan 2022 20:16:09 +0000 Subject: [PATCH] Define canned date if not set. Prevents undefined errors --- payments.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/payments.php b/payments.php index 78aad296..29b345ac 100644 --- a/payments.php +++ b/payments.php @@ -36,6 +36,11 @@ if(isset($_GET['o'])){ $disp = "ASC"; } +if (empty($_GET['canned_date'])) { + //Prevents lots of undefined variable errors. + // $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00 + $_GET['canned_date'] = 'custom'; +} //Date Filter if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);