From 29467211c505b9c5642038496018be037426fc74 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 16 Jun 2026 08:06:43 +0000 Subject: [PATCH] Redirect direct GETs of booking-process to home Hitting /booking-process via GET (or any POST without sendBooking) fell through past the form-submit guard and tripped three undefined-variable warnings on the final sendEmail() call. Bail out to the site root early, matching the pattern in manage_booking_process. Co-Authored-By: Claude Opus 4.7 --- application/controllers/Pages.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/controllers/Pages.php b/application/controllers/Pages.php index 1c524d6..3fed32f 100755 --- a/application/controllers/Pages.php +++ b/application/controllers/Pages.php @@ -284,6 +284,11 @@ class Pages extends CI_Controller { $data['pageTitle'] = ''; $data['subpage'] = ''; + if(!isset($_POST['sendBooking'])){ + header('Location:'.SITEURL); + return; + } + if(isset($_POST['sendBooking'])){ //calculate finish time $serviceStartTime = date("H:i:s", strtotime($_POST['booking_start_time']));