Skip to content

Commit 6fd6d3e

Browse files
committed
Fixes Location::updateScheduleTimeSlot() to clear timeslot when datetime arg is null
See tastyigniter/TastyIgniter#732 Signed-off-by: Sam Poyigi <[email protected]>
1 parent 1ddea31 commit 6fd6d3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/Location.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function updateScheduleTimeSlot($dateTime, $isAsap = TRUE)
8585
{
8686
$oldSlot = $this->getSession('order-timeslot');
8787

88-
$slot['dateTime'] = !$isAsap ? make_carbon($dateTime) : null;
88+
$slot['dateTime'] = (!$isAsap && !is_null($dateTime)) ? make_carbon($dateTime) : null;
8989
$slot['isAsap'] = $isAsap;
9090

9191
if (!$slot) {

0 commit comments

Comments
 (0)