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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
f86952dc95
commit
29467211c5
@@ -284,6 +284,11 @@ class Pages extends CI_Controller {
|
|||||||
$data['pageTitle'] = '';
|
$data['pageTitle'] = '';
|
||||||
$data['subpage'] = '';
|
$data['subpage'] = '';
|
||||||
|
|
||||||
|
if(!isset($_POST['sendBooking'])){
|
||||||
|
header('Location:'.SITEURL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($_POST['sendBooking'])){
|
if(isset($_POST['sendBooking'])){
|
||||||
//calculate finish time
|
//calculate finish time
|
||||||
$serviceStartTime = date("H:i:s", strtotime($_POST['booking_start_time']));
|
$serviceStartTime = date("H:i:s", strtotime($_POST['booking_start_time']));
|
||||||
|
|||||||
Reference in New Issue
Block a user