From a48e3029f13c93d171150cd05f0ebff0e26b82e9 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Wed, 5 Jan 2022 14:21:06 +0000 Subject: [PATCH] Ensure canned_date is defined before it is referenced, to prevent errors --- clients.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clients.php b/clients.php index 10bc9ef6..f41ff650 100644 --- a/clients.php +++ b/clients.php @@ -46,6 +46,12 @@ if(isset($_GET['order'])){ $order_display = "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['date_from'])){ $date_from = mysqli_real_escape_string($mysqli,$_GET['date_from']);