RedisException
MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. RedisException thrown with message "MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error." Stacktrace: #14 RedisException in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:69 #13 Redis:setex in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:69 #12 Cache:Set in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:53 #11 Cache:SetObject in /home/deploy/EHungry-8-simon/Web/classes/HolidayHours.class.php:157 #10 HolidayHours:getByDateAndTypeAndRestaurantOrCategory in /home/deploy/EHungry-8-simon/Web/classes/HolidayHours.class.php:102 #9 HolidayHours:getByDateAndRestaurantAndType in /home/deploy/EHungry-8-simon/Web/classes/Restaurant.class.php:1275 #8 Restaurant:isOpenAtForType in /home/deploy/EHungry-8-simon/Web/classes/Cart.class.php:863 #7 Cart:getDayOrderIsFor in /home/deploy/EHungry-8-simon/Web/classes/Cart.class.php:684 #6 Cart:getEarliestOrderTime in /home/deploy/EHungry-8-simon/Web/classes/Restaurant.class.php:2468 #5 Restaurant:getAvailableTimes in /home/deploy/EHungry-8-simon/Web/classes/Restaurant.class.php:2607 #4 Restaurant:getAvailableDates in /home/deploy/EHungry-8-simon/Web/classes/Restaurant.class.php:2627 #3 Restaurant:hasAvailableDays in /home/deploy/EHungry-8-simon/Web/lib/global.php:4057 #2 checkTimeWarning in /home/deploy/EHungry-8-simon/Web/model3.0/customer/ordering3.php:251 #1 include_once in /home/deploy/EHungry-8-simon/Web/controllers/customer.php:855 #0 require in /home/deploy/EHungry-8-simon/Web/index.php:30
Stack frames (15)
14
RedisException
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
69
13
Redis
setex
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
69
12
Cache
Set
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
53
11
Cache
SetObject
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
HolidayHours.class.php
157
10
HolidayHours
getByDateAndTypeAndRestaurantOrCategory
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
HolidayHours.class.php
102
9
HolidayHours
getByDateAndRestaurantAndType
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
1275
8
Restaurant
isOpenAtForType
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cart.class.php
863
7
Cart
getDayOrderIsFor
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cart.class.php
684
6
Cart
getEarliestOrderTime
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
2468
5
Restaurant
getAvailableTimes
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
2607
4
Restaurant
getAvailableDates
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
2627
3
Restaurant
hasAvailableDays
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
lib
/
global.php
4057
2
checkTimeWarning
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
model3.0
/
customer
/
ordering3.php
251
1
include_once
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
controllers
/
customer.php
855
0
require
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
    }
 
    public static function SetObject($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function SetArray($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function SetBoolean($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function Set($key, $var, $expire = 86400) {
        App::debugbarLog('debug', "Cache set: $key");
        if ($i = static::getInstance()) {
            $var = static::beforeSet($var);
            return $expire > 0?
                $i->setEx($key, $expire, $var) :
                $i->set($key, $var);
        }
        return null;
    }
 
    public static function Exists(...$key):?bool {
        if ($i = static::getInstance()) {
            return $i->exists($key);
        }
        return null;
    }
 
    public static function Expire($key, $ttl) {
        if ($i = static::getInstance()) {
            return $i->expire($key, $ttl);
        }
        return false;
    }
 
    /**
Arguments
  1. "MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error."
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
    }
 
    public static function SetObject($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function SetArray($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function SetBoolean($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function Set($key, $var, $expire = 86400) {
        App::debugbarLog('debug', "Cache set: $key");
        if ($i = static::getInstance()) {
            $var = static::beforeSet($var);
            return $expire > 0?
                $i->setEx($key, $expire, $var) :
                $i->set($key, $var);
        }
        return null;
    }
 
    public static function Exists(...$key):?bool {
        if ($i = static::getInstance()) {
            return $i->exists($key);
        }
        return null;
    }
 
    public static function Expire($key, $ttl) {
        if ($i = static::getInstance()) {
            return $i->expire($key, $ttl);
        }
        return false;
    }
 
    /**
Arguments
  1. "hh_2025-04-30 00:00:00_r7082_DINEIN_0"
    
  2. 86400
    
  3. "N;"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
    public static function getInstance() {
        if (static::$redisObj === null) {
            static::$redisObj = new Redis();
            try {
                if (!@static::$redisObj->connect(static::$host, (int)static::$port)) {
                    static::$redisObj = false;
                    Splunk::log(Splunk::LOG_REDIS_CONN, ['error' => 'Error connecting']);
                } else {
                    static::$redisObj->select(static::$db);
                }
            } catch (RedisException $e) {
                static::$redisObj = false;
                Splunk::log(Splunk::LOG_REDIS_CONN, ['error' => 'Error connecting: '.$e->getMessage()]);
            }
        }
        return static::$redisObj;
    }
 
    public static function SetObject($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function SetArray($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function SetBoolean($key, $var, $expire = 86400) {
        return static::Set($key, serialize($var), $expire);
    }
 
    public static function Set($key, $var, $expire = 86400) {
        App::debugbarLog('debug', "Cache set: $key");
        if ($i = static::getInstance()) {
            $var = static::beforeSet($var);
            return $expire > 0?
                $i->setEx($key, $expire, $var) :
                $i->set($key, $var);
        }
        return null;
    }
Arguments
  1. "hh_2025-04-30 00:00:00_r7082_DINEIN_0"
    
  2. "N;"
    
  3. 86400
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
HolidayHours.class.php
                }
            }
        } else {
            $sql = "SELECT id FROM ".HolidayHours::getTableName()." WHERE for_date = ? AND " .
                ($cid ? "category_id" : "restaurant_id") . " = ? AND order_type = ? $where ORDER BY id DESC";
            $db_conn->bindParameter($sql, 1, $date, "string");
            $db_conn->bindParameter($sql, 1, $rid, "integer");
            $db_conn->bindParameter($sql, 1, $type, "string");
            $result = $db_conn->query($sql);
            if ($result && $result->rowCount() > 0) {
                if ($row = $result->fetch()) {
                    $hh = new HolidayHours($row['id']);
                    Cache::SetObject($cacheKey, $hh);
                    return $hh;
                }
            }
        }
        
        if ($cacheKey) {
            Cache::SetObject($cacheKey, null);
        }
        return null;
    }
 
    public static function getByDateAndRestaurant($date, $rid) {
        $db_conn = DB::conn();
        $rbs = [];
        $sql = "SELECT id FROM ".HolidayHours::getTableName()." WHERE for_date = ? AND restaurant_id = ? ORDER BY id DESC";
        $db_conn->bindParameter($sql, 1, $date, "string");
        $db_conn->bindParameter($sql, 1, $rid, "integer");
        $result = $db_conn->query($sql);
        if ($result) {
            while ($row = $result->fetch()) {
                $rbs[] = new HolidayHours($row['id']);
            }
        }
        return $rbs;
    }
 
    public static function storeHours($holidayClosed, $forDate, $restaurantID, $holidayNotifications, $holidayOpenHour, $holidayOpenMinute, $holidayOpenMeridien, $holidayClosedHour, $holidayClosedMinute, $holidayClosedMeridien, $timeErrorMessage, $orderType, $namedHolidayID, $holidayDateRangeID, $categoryID = null, $isYearly = false, $showCategoryWhenClosed = false) {
Arguments
  1. "hh_2025-04-30 00:00:00_r7082_DINEIN_0"
    
  2. null
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
HolidayHours.class.php
        }
        if (!$time) {
            $time = $restaurant->getLocalTime();
        }
        $holidayHours = HolidayHours::getByDateAndCategoryAndType(date('Y-m-d 00:00:00', $time), $category->getId(), $orderType, $isHiddenToCustomers);
        if (is_object($holidayHours)) {
            return $holidayHours;
        }
        //check parent category too
        if ($category->parent_id) {
            $holidayHours = HolidayHours::getByDateAndCategoryAndType(date('Y-m-d 00:00:00', $time), $category->parent_id, $orderType, $isHiddenToCustomers);
            if (is_object($holidayHours)) {
                return $holidayHours;
            }
        }
        return false;
    }
 
    public static function getByDateAndRestaurantAndType($date, $rid, $type = 'PICKUP') {
        return HolidayHours::getByDateAndTypeAndRestaurantOrCategory($date, $rid, null, $type);
    }
 
    public static function getByDateAndCategoryAndType($date, $cid, $type = null, $isHiddenToCustomers = false) {
        return HolidayHours::getByDateAndTypeAndRestaurantOrCategory($date, null, $cid, $type, $isHiddenToCustomers);
    }
    
    public static function getByDateAndTypeAndRestaurantOrCategory($date, $rid = null, $cid = null, $type = 'PICKUP', $isHiddenToCustomers = false) {
        $db_conn = DB::conn();
        $cacheKey = 'hh_'.$date.'_'.($cid > 0 ? ('c'.$cid):('r'.$rid)).'_'.($type?:'ALL') . "_" . ($isHiddenToCustomers ? '1' : '0');
 
        $aObj = Cache::GetObject($cacheKey, true);
        if ($aObj || is_null($aObj)) {
            return $aObj;
        }
 
        $where = '';
        if ($cid) {
            $rid = $cid;
            if ($isHiddenToCustomers) {
                $where .= ' AND show_category_when_closed = 0';
Arguments
  1. "2025-04-30 00:00:00"
    
  2. 7082
    
  3. null
    
  4. "DINEIN"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
        if ($type == 'PICKUP') {
            if (!$this->getHasPickupBase() && !$this->getHasDineInBase()) {
                return [
                    'open' => false,
                    'error' => PICKUP_LABEL.'/'.DINEIN_LABEL.' are not available at this restaurant.',
                    'dayNumber' => $dayNumber,
                ];
            }
        } elseif ($type == 'DELIVERY') {
            if (!$this->getHasDeliveryBase()) {
                return [
                    'open' => false,
                    'error' => DELIVERY_LABEL.' is not available at this restaurant.',
                    'dayNumber' => $dayNumber
                ];
            }
        }

        // check to see if we are operating in holiday hours
        $holidayHours = HolidayHours::getByDateAndRestaurantAndType(date('Y-m-d 00:00:00', $local), $this->getId(), $type);
        if (is_object($holidayHours)) {
            $startTime = strtotime(date('1990-01-01 H:i:00', strtotime($holidayHours->getStartHour())));
            $endTime = strtotime(date('1990-01-01 H:i:00', strtotime($holidayHours->getEndHour())));
            $readyTime = strtotime(date('1990-01-01 H:i:s', $local));
            if (!$holidayHours->getIsClosed() && ($startTime <= $readyTime && $endTime >= $readyTime)) {
                return [
                    'open' => true,
                    'dayNumber' => $dayNumber,
                ];
            } else {
                return [
                    'open' => false,
                    'error' => 'We are closed at the selected time. '.$holidayHours->getMessage(),
                    'dayNumber' => $dayNumber,
                ];
            }
        }
        $closedHours = ClosedHours::getByDateAndRestaurantAndType($local, $this->getId(), $type);
        if (is_array($closedHours) && count($closedHours) > 0) {
            foreach ($closedHours as $h) {
Arguments
  1. "2025-04-30 00:00:00"
    
  2. 7082
    
  3. "DINEIN"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cart.class.php
        if ($returnClosedHours && isset($openInfo['closedHours']) && is_object($openInfo['closedHours'])) {
            return $openInfo['closedHours'];
        } else {
            return !$openInfo['open'];
        }
    }
 
    public function getIsTypeClosed($restaurant) {
        return $this->getIsClosedAtTime($restaurant, $restaurant->getLocalTime());
    }
 
    /**
     * Finds what day an order is actually for (when placed after midnight especially)
     * @param Restaurant $restaurant
     * @param string     $selectedReadyTime The timestamp to check
     * @return int|null
     */
    public function getDayOrderIsFor($restaurant, $selectedReadyTime) {
        $menu = isset($_SESSION['menu_id'])? new Menu($_SESSION['menu_id']) : null;
        $openInfo = $restaurant->isOpenAtForType($selectedReadyTime, $this->getBaseOrderType(), $menu);
        return $openInfo['dayNumber'];
    }
 
    /**
     * Finds the next earliest day/time at which this restaurant location is open
     * Requires $cart->getBaseOrderType()
     * @param Restaurant $restaurant
     * @param string     $selectedTime The timestamp to start from/offset from
     * @return false|float|int
     */
    public function getNextOpenTime($restaurant, $selectedTime, $ignoreMenuTime = false, $noLimit = false) {
        if (!$ignoreMenuTime && isset($_SESSION['menu_id'])) {
            $menu = new Menu($_SESSION['menu_id']);
        } else {
            $menu = null;
        }
 
        $selectedTime = floor($selectedTime / 60) * 60;
        //if we're open at the selected time, just return that
        if (!$this->getIsClosedAtTime($restaurant, $selectedTime, $menu, false, $ignoreMenuTime)) {
Arguments
  1. 1745997300.0
    
  2. "DINEIN"
    
  3. Menu {}
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cart.class.php
            //$startFromTime is passed when generating time slots for future days
            if ($startFromTime) {
                $localTime = $startFromTime;
                $eot = max($startFromTime, $eot);
            }
 
            // if the restaurant is configured to require the minimum prep time between opening and ready time for the order
            // -check if the resulting "earliest" time is less than the opening time for the selected day plus the min prep time for the order
            // -if it is, then bump up the selected ready time to account for that
            if ($selectedTime) {
                $sTime = strtotime($selectedTime);
                $ptoTime = max($eot, $sTime);
            } elseif ($restaurant->delivery_allowed_till_closing) {
                $ptoTime = strtotime("-$prepTime Seconds", $eot);
            } else {
                $ptoTime = $eot;
            }
 
            // get opening time for selected day
            $selectedDay = $this->getDayOrderIsFor($restaurant, $ptoTime);
            $dt = ($this->getBaseOrderType() == 'DELIVERY')? 'Delivery' : '';
            $day = date('l', strtotime("Sunday +{$selectedDay} days"));
            $opensAt = $restaurant->{'get'.$dt.$day.'Open'}();
            $closesAt = $restaurant->{'get'.$dt.$day.'Closed'}();
            $closesAtToday = $restaurant->{'get'.$dt.date('l', $restaurant->getLocalTime()).'Closed'}();
 
            $opensAt2 = false;
            if ($restaurant->getTwoHourSets()) {
                $opensAt2 = $restaurant->{'get'.$dt.$day.'Open2'}();
                $closesAtToday = $restaurant->{'get'.$dt.date('l', $restaurant->getLocalTime()).'Closed2'}();
            }
 
            // check to see if we are operating in holiday hours
            $holidayHours = HolidayHours::getByDateAndRestaurantAndType(date('Y-m-d 00:00:00', $ptoTime), $restaurant->getId(), $this->getBaseOrderType());
            if (is_object($holidayHours)) {
                $opensAtTime = strtotime(date('Y-m-d ', $ptoTime).$holidayHours->getStartHour());
                if ($opensAtTime + $prepTime > $eot) {
                    $eot = $opensAtTime + ($restaurant->getRequirePrepTimeOpening() ? $prepTime : 0);
                }
            } else {
Arguments
  1. Restaurant {}
    
  2. 1745997300.0
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
                $menuTimesRange = [[$menuStartTime => $menuEndTime]];
                $menuTimes = getTimes($menuTimesRange);
            }
            $validTimes = array_intersect($validTimes, $menuTimes);
        }

        if ($prevDayMenusClosed && $prevDayClose) {
            $startEndInvalidArray[] = ['00:00' => $prevDayClose];
        }
        if ($prevDayMenusClose > '00:00') {
            $prevDayTimes = getTimes([['00:00' => $prevDayMenusClose]]);
            $validTimes = array_merge($prevDayTimes, $validTimes);
            if ($prevDayClose) {
                $startEndInvalidArray[] = [$prevDayMenusClose => $prevDayClose];
            }
        }

        //if date is today make sure minimum time is after now and earliest order time
        if (date('Y-m-d') == date('Y-m-d', $dateTimestamp)) {
            $eot = $cart->getEarliestOrderTime($this, false);
            $earliestTimeHour = date('H:i', max($restaurantTime, $eot));
            //if earliest order time is tomorrow, return no times for today (23:59 => 23:59)
            if (strtotime(date('Y-m-d', $eot)) > strtotime(date('Y-m-d'))) {
                $dayTimes = [];
            } else {
                $dayTimes = getTimes([[$earliestTimeHour => '23:59']]);
            }
            $validTimes = array_intersect($validTimes, $dayTimes);
        } elseif ($eot) {
            $eot = $cart->getEarliestOrderTime($this, null, false, strtotime(date('Y-m-d', $dateTimestamp)));
            $dayTimes = getTimes([[date('H:i', $eot) => '23:59']]);
            $validTimes = array_intersect($validTimes, $dayTimes);
        }


        if (!$ignoreOrderingDaysLimit) {
            $inHoursFromPrevDay = $prevDayClose !== null && strtotime(date('H:i', $restaurantTime)) < strtotime($prevDayClose);
            $isDateTomorrow = date('Y-m-d', strtotime(' +1 day', $restaurantTime)) == date('Y-m-d', $dateTimestamp);
            $isDateToday = date('Y-m-d', $restaurantTime) == date('Y-m-d', $dateTimestamp);
            if ($this->same_day_orders_only || $this->asap_orders_only) {
Arguments
  1. Restaurant {}
    
  2. false
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
            //disable days for when the cart items' category is closed
            $categories = $cart->getCartItemsCategories();
            foreach ($categories as $category) {
                $isCategoryHidden = ClosedHours::isCategoryDisabled($this, $category, $currentLocalTime, false, $orderType) || HolidayHours::isCategoryDisabled($this, $category, $currentLocalTime, false, $orderType);
                if ($isCategoryHidden) {
                    $closed = true;
                }
            }

            //ordering closed
            $closedUntil = $this->getLocalPublicOrderingClosedUntilText(true, $orderType);
            if ($closedUntil && strtotime(date('Y-m-d', $closedUntil)) > strtotime(date('Y-m-d', $currentLocalTime))) {
                $closed = true;
            }

            $dateCurrent = date('Y-m-d', $currentLocalTime);
            if (!$closed) {
                //if no times are available on that day - show whole day as unavailable
                $times = $this->getAvailableTimes(new DateTime($dateCurrent), false, $excludeClosedHours, $getTimesForAnyMenus, $ignoreOrderingDaysLimit);
                if (count($times)) {
                    $ymd = date('Y-m-d', $currentLocalTime);
                    if ($returnAsKeys) {
                        $availableDates[$ymd] = $ymd;
                    } else {
                        $availableDates[] = $ymd;
                    }
                }
            }
        }

        $cart->setBaseOrderType($savedOrderType);
        $cart->updateToSession();

        return $availableDates;
    }

    public function hasAvailableDays($selectedTime, $orderType) {
        $dateTime = new DateTime(date('Y-m-d', $selectedTime));
        $availableDates = $this->getAvailableDates($dateTime, $orderType, true, true, false, true);
Arguments
  1. DateTime @1745910000 {
      date: 2025-04-29 00:00:00.0 America/Los_Angeles (-07:00)
    }
    
  2. false
    
  3. true
    
  4. true
    
  5. true
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
                if (count($times)) {
                    $ymd = date('Y-m-d', $currentLocalTime);
                    if ($returnAsKeys) {
                        $availableDates[$ymd] = $ymd;
                    } else {
                        $availableDates[] = $ymd;
                    }
                }
            }
        }

        $cart->setBaseOrderType($savedOrderType);
        $cart->updateToSession();

        return $availableDates;
    }

    public function hasAvailableDays($selectedTime, $orderType) {
        $dateTime = new DateTime(date('Y-m-d', $selectedTime));
        $availableDates = $this->getAvailableDates($dateTime, $orderType, true, true, false, true);
        return count($availableDates) > 0;
    }

    public function hasOrderingDaysForAnyType() {
        return count($this->getOrderingDaysForAnyType()) > 0;
    }

    public function getOrderingDaysForAnyType($ignoreDaysLimit = false) {
        $orderTypes = $this->getEnabledBaseOrderTypes();
        $availableDates = [];
        $dateTime = new DateTime(date('Y-m-d', $this->getLocalTime()));
        if (isset($orderTypes["PICKUP"]) || isset($orderTypes["DINEIN"])) {
            $availableDates = $this->getAvailableDates($dateTime, 'PICKUP', false, $ignoreDaysLimit, false, true);
        }
        if (isset($orderTypes["DELIVERY"])) {
            $availableDates = array_merge($availableDates, $this->getAvailableDates($dateTime, 'DELIVERY', false, $ignoreDaysLimit, false, true));
        }
        sort($availableDates);
        return $availableDates;
    }
Arguments
  1. DateTime @1745910000 {
      date: 2025-04-29 00:00:00.0 America/Los_Angeles (-07:00)
    }
    
  2. "DINEIN"
    
  3. true
    
  4. true
    
  5. false
    
  6. true
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
lib
/
global.php
function checkTimeWarning(Cart $cart, Restaurant $restaurant) {
    $originalOrderType = $cart->base_order_type;
    $localTime = $restaurant->local_time;
    $holidayDate = date('Y-m-d 00:00:00', $localTime);

    $closedTypePickup = false;
    if ($restaurant->getHasPickupBase()) {
        $cart->setBaseOrderType('PICKUP');
        $cart->updateToSession();
        $closedTypePickup = $cart->getIsClosedAtTime($restaurant, $localTime);
        $eot['PICKUP'] = $restaurant->hasAvailableDays($localTime, 'PICKUP') ? $cart->getEarliestOrderTime($restaurant, null, true) : null;
    }

    $closedTypeDinein = false;
    if ($restaurant->getHasDineInBase()) {
        $cart->setBaseOrderType('DINEIN');
        $cart->updateToSession();
        $closedTypeDinein = $cart->getIsClosedAtTime($restaurant, $localTime);
        $eot['DINEIN'] = $restaurant->hasAvailableDays($localTime, 'DINEIN') ? $cart->getEarliestOrderTime($restaurant, null, true) : null;
    }

    if ($restaurant->getHasDineInBase() || $restaurant->getHasPickupBase()) {
        $holidayHours = HolidayHours::getByDateAndRestaurantAndType($holidayDate, $restaurant->id, $cart->base_order_type);
        if ($holidayHours) {
            $startTime = strtotime(date('1990-01-01 H:i:00', strtotime($holidayHours->start_hour)));
            $endTime = strtotime(date('1990-01-01 H:i:00', strtotime($holidayHours->end_hour)));
            $readyTime = strtotime(date('1990-01-01 H:i:s', $localTime));
            if ($holidayHours->is_closed || ($startTime > $readyTime || $endTime < $readyTime)) {
                $eot['DINEIN_HOLIDAY'] = $holidayHours->message;
            }
        }

        $closedHours = ClosedHours::getByDateAndRestaurantAndType($localTime, $restaurant->id, $cart->base_order_type) ?: [];
        foreach ($closedHours as $h) {
            $startTime = strtotime(date('1990-01-01 H:i:00', strtotime($h->start_time)));
            $endTime = strtotime(date('1990-01-01 H:i:00', strtotime($h->end_time)));
            $readyTime = strtotime(date('1990-01-01 H:i:s', $localTime));
            if ($startTime <= $readyTime && $endTime >= $readyTime) {
                $eot['DINEIN_HOLIDAY'] = $h->message;
Arguments
  1. 1745995544
    
  2. "DINEIN"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
model3.0
/
customer
/
ordering3.php
        }
 
        if (ClosedHours::isCategoryHidden($restaurant, $category) || HolidayHours::isCategoryHidden($restaurant, $category)) {
            redirectToOrderingWithError('Sorry, this category is currently unavailable.', [$restaurant, $menu, -1]);
        }
        $page_fragment = $account->getCategoryPageFragment($menu, $category->getId(), $restaurant->getHideAllPrices(), $restaurant, true);
 
        if (isset($_REQUEST['sort'])) {
            if ($_REQUEST['sort'] == "name") {
                usort($items, array("MenuItem", "nameAlphaSort"));
            } elseif ($_REQUEST['sort'] == "price") {
                usort($items, array("MenuItem", "priceSort"));
            }
        }
        break;
    case 4: //Item
    case 5: //Price
        //check if we're closed right now. If so, display warning
        if (!isset($_SESSION['time_ok']) && is_object($restaurant)) {
            $eot = checkTimeWarning($cart, $restaurant);
        }
        break;
}
 
if ($_REQUEST['ordering_level'] < 3 && is_object($menu)) {
    if ($account->getDefaultOrderingPage() == 1) {
        if ($_GET['embed']) {
            $qs = '?embed='.$_GET['embed'];
        } else {
            $qs = '';
        }
        redirectToOrdering([$restaurant, $menu, -1], $qs);
    } elseif ($account->getDefaultOrderingPage() == 2) {
        if ($_GET['embed']) {
            $qs = '?sort=alpha&embed='.$_GET['embed'];
        } else {
            $qs = '?sort=alpha';
        }
        redirectToOrdering([$restaurant, $menu, -1], $qs);
    }
Arguments
  1. Cart {}
    
  2. Restaurant {}
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
controllers
/
customer.php
 
        $cart->setDefaultOrderType($account, $restaurant);
 
        $cart->setDefaultFees($account, $restaurant);
    }
 
    $restaurantRequiredPages = [
        'login',
        'customerorders'
    ];
    if (is_null($restaurant) && in_array($_REQUEST['form'], $restaurantRequiredPages)) {
        redirectTo('home');
    }
 
    $modelPath = CORE_PATH . 'model4.0/customer/'.$_REQUEST['form'].'.php';
} else {
    $_REQUEST['mobiledetect'] = new Mobile_Detect;
}
if (is_readable($modelPath)) {
    include_once($modelPath);
}
App::debugbarTime("model '{$_REQUEST['form']}'");
 
$custom_nav = CustomNavigationTab::getAllForAccount($account->getId());
 
$view2HideRightColumns = ['checkout', 'dashboard', 'customerdetails', 'customerorders',
                                'mydeliveryaddresses', 'emailpreferences', 'mycoupons', 'mycreditcards', 'mypassword',
                                'customerorderdetails', 'editcustomer', 'adddeliveryaddress',
                                'editlocation', 'orderconfirmation','viewcart', 'map', 'validatecallback'];
if (in_array($_REQUEST['form'], $view2HideRightColumns)) {
    $hideRightColumn = true;
}
 
$myAccountPages = ['accountsettings', 'dashboard', 'customerdetails', 'customerorders', 'editaddress', 'editcustomer', 'mydeliveryaddresses', 'editlocation', 'emailpreferences', 'mycoupons', 'mycreditcards', 'mypassword', 'adddeliveryaddress', 'map', 'myloyalty'];
if (in_array($_REQUEST['form'], $myAccountPages)) {
    $isMyAccountPage = true;
}
 
if (!isset($cart) || !is_object($cart)) {
    $GLOBALS['cart'] = \Cart::getCurrent();
Arguments
  1. "/home/deploy/EHungry-8-simon/Web/model3.0/customer/ordering3.php"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
index.php
App::startTime();
 
ErrorHandlers::register();
 
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
 
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
 
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
    require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");
 
Arguments
  1. "/home/deploy/EHungry-8-simon/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
empty
empty
Key Value
PHPSESSID
"or5oh80a4gki88uerf4l0ipise"
Key Value
loc
"en_US"
customer_account_id
57685
restaurant_id
7082
menu_id
9068
cart
Cart {}
Key Value
UNIQUE_ID
"aBGc557jk-M49dOUJDnrcwAAABc"
SCRIPT_URL
"/restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
SCRIPT_URI
"http://www.springroll.com.8.simon.ehungry.net/restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
HTTP_HOST
"www.springroll.com.8.simon.ehungry.net"
HTTP_X_REAL_IP
"18.116.82.202"
HTTP_X_FORWARDED_FOR
"18.116.82.202"
HTTP_X_CONFKEY
"Main_Domain:6462"
HTTP_SCHEME
"https"
HTTP_EHENV
"TODO"
HTTP_CONNECTION
"close"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_COOKIE
"PHPSESSID=or5oh80a4gki88uerf4l0ipise"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache/2.4.62 () mod_wsgi/4.6.5 Python/3.7 PHP/7.2.34"
SERVER_NAME
"www.springroll.com.8.simon.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-8-simon/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-8-simon/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-8-simon/Web/index.php"
REMOTE_PORT
"44850"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
REQUEST_URI
"/restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
SCRIPT_NAME
"/restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
PHP_SELF
"/restaurant/tatakijapanesenewyork/order/main-menu/beverages/water"
REQUEST_TIME_FLOAT
1745984743.966
REQUEST_TIME
1745984743
empty
0. Whoops\Handler\PrettyPageHandler

Fatal error: Uncaught RedisException: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. in [no active file]:0 Stack trace: #0 {main} thrown in [no active file] on line 0