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: #12 RedisException in /home/deploy/EHungry-3-boyan/Web/classes/Cache.class.php:69 #11 Redis:setex in /home/deploy/EHungry-3-boyan/Web/classes/Cache.class.php:69 #10 Cache:Set in /home/deploy/EHungry-3-boyan/Web/classes/Cache.class.php:57 #9 Cache:SetArray in /home/deploy/EHungry-3-boyan/Web/classes/ClosedHours.class.php:142 #8 ClosedHours:getByDateAndTypeAndRestaurantOrCategory in /home/deploy/EHungry-3-boyan/Web/classes/ClosedHours.class.php:95 #7 ClosedHours:getByDateAndRestaurantAndType in /home/deploy/EHungry-3-boyan/Web/classes/Restaurant.class.php:2387 #6 Restaurant:getAvailableTimes in /home/deploy/EHungry-3-boyan/Web/classes/Restaurant.class.php:2663 #5 Restaurant:getAvailableDates in /home/deploy/EHungry-3-boyan/Web/classes/Restaurant.class.php:2713 #4 Restaurant:getOrderingDaysForAnyType in /home/deploy/EHungry-3-boyan/Web/classes/Restaurant.class.php:2690 #3 Restaurant:hasOrderingDaysForAnyType in /home/deploy/EHungry-3-boyan/Web/lib/global.php:1007 #2 isOrderingClosed in /home/deploy/EHungry-3-boyan/Web/model3.0/customer/ordering3.php:48 #1 include_once in /home/deploy/EHungry-3-boyan/Web/controllers/customer.php:824 #0 require in /home/deploy/EHungry-3-boyan/Web/index.php:30
Stack frames (13)
12
RedisException
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Cache.class.php
69
11
Redis
setex
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Cache.class.php
69
10
Cache
Set
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Cache.class.php
57
9
Cache
SetArray
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
ClosedHours.class.php
142
8
ClosedHours
getByDateAndTypeAndRestaurantOrCategory
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
ClosedHours.class.php
95
7
ClosedHours
getByDateAndRestaurantAndType
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
2387
6
Restaurant
getAvailableTimes
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
2663
5
Restaurant
getAvailableDates
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
2713
4
Restaurant
getOrderingDaysForAnyType
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
2690
3
Restaurant
hasOrderingDaysForAnyType
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
lib
/
global.php
1007
2
isOrderingClosed
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
model3.0
/
customer
/
ordering3.php
48
1
include_once
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
controllers
/
customer.php
824
0
require
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-3-boyan
/
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-3-boyan
/
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. "ch_r11798_sunday_PICKUP_0"
    
  2. 86400
    
  3. "a:2:{i:0;O:11:"ClosedHours":27:{s:12:"pdfPageCount";i:0;s:10:"timestamps";b:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:12:"\x00*\x00nullables";a:0:{}s:13:"\x00*\x00connection";N;s:8:"\x00*\x00table";N;s:13:"\x00*\x00primaryKey";s:2:"id";s:10:"\x00*\x00keyType";s:3:"int";s:12:"incrementing";b:1;s:7:"\x00*\x00with";a:0:{}s:12:"\x00*\x00withCount";a:0:{}s:10:"\x00*\x00perPage";i:15;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:13:"\x00*\x00attributes";a:19:{s:2:"id";i:27374;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"22:00:00";s:8:"end_time";s:8:"23:59:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:0;s:8:"saturday";i:0;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:11:"\x00*\x00original";a:19:{s:2:"id";i:27374;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"22:00:00";s:8:"end_time";s:8:"23:59:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:0;s:8:"saturday";i:0;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:8:"\x00*\x00casts";a:0:{}s:8:"\x00*\x00dates";a:0:{}s:13:"\x00*\x00dateFormat";N;s:10:"\x00*\x00appends";a:0:{}s:9:"\x00*\x00events";a:0:{}s:14:"\x00*\x00observables";a:0:{}s:12:"\x00*\x00relations";a:0:{}s:10:"\x00*\x00touches";a:0:{}s:10:"\x00*\x00visible";a:0:{}s:11:"\x00*\x00fillable";a:0:{}s:10:"\x00*\x00guarded";a:1:{i:0;s:1:"*";}}i:1;O:11:"ClosedHours":27:{s:12:"pdfPageCount";i:0;s:10:"timestamps";b:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:12:"\x00*\x00nullables";a:0:{}s:13:"\x00*\x00connection";N;s:8:"\x00*\x00table";N;s:13:"\x00*\x00primaryKey";s:2:"id";s:10:"\x00*\x00keyType";s:3:"int";s:12:"incrementing";b:1;s:7:"\x00*\x00with";a:0:{}s:12:"\x00*\x00withCount";a:0:{}s:10:"\x00*\x00perPage";i:15;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:13:"\x00*\x00attributes";a:19:{s:2:"id";i:27373;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"00:00:00";s:8:"end_time";s:8:"06:00:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:1;s:8:"saturday";i:1;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:11:"\x00*\x00original";a:19:{s:2:"id";i:27373;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"00:00:00";s:8:"end_time";s:8:"06:00:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:1;s:8:"saturday";i:1;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:8:"\x00*\x00casts";a:0:{}s:8:"\x00*\x00dates";a:0:{}s:13:"\x00*\x00dateFormat";N;s:10:"\x00*\x00appends";a:0:{}s:9:"\x00*\x00events";a:0:{}s:14:"\x00*\x00observables";a:0:{}s:12:"\x00*\x00relations";a:0:{}s:10:"\x00*\x00touches";a:0:{}s:10:"\x00*\x00visible";a:0:{}s:11:"\x00*\x00fillable";a:0:{}s:10:"\x00*\x00guarded";a:1:{i:0;s:1:"*";}}}"
    
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Cache.class.php
                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;
    }
 
    public static function Exists(...$key):?bool {
        if ($i = static::getInstance()) {
            return $i->exists($key);
Arguments
  1. "ch_r11798_sunday_PICKUP_0"
    
  2. "a:2:{i:0;O:11:"ClosedHours":27:{s:12:"pdfPageCount";i:0;s:10:"timestamps";b:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:12:"\x00*\x00nullables";a:0:{}s:13:"\x00*\x00connection";N;s:8:"\x00*\x00table";N;s:13:"\x00*\x00primaryKey";s:2:"id";s:10:"\x00*\x00keyType";s:3:"int";s:12:"incrementing";b:1;s:7:"\x00*\x00with";a:0:{}s:12:"\x00*\x00withCount";a:0:{}s:10:"\x00*\x00perPage";i:15;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:13:"\x00*\x00attributes";a:19:{s:2:"id";i:27374;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"22:00:00";s:8:"end_time";s:8:"23:59:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:0;s:8:"saturday";i:0;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:11:"\x00*\x00original";a:19:{s:2:"id";i:27374;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"22:00:00";s:8:"end_time";s:8:"23:59:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:0;s:8:"saturday";i:0;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:8:"\x00*\x00casts";a:0:{}s:8:"\x00*\x00dates";a:0:{}s:13:"\x00*\x00dateFormat";N;s:10:"\x00*\x00appends";a:0:{}s:9:"\x00*\x00events";a:0:{}s:14:"\x00*\x00observables";a:0:{}s:12:"\x00*\x00relations";a:0:{}s:10:"\x00*\x00touches";a:0:{}s:10:"\x00*\x00visible";a:0:{}s:11:"\x00*\x00fillable";a:0:{}s:10:"\x00*\x00guarded";a:1:{i:0;s:1:"*";}}i:1;O:11:"ClosedHours":27:{s:12:"pdfPageCount";i:0;s:10:"timestamps";b:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:12:"\x00*\x00nullables";a:0:{}s:13:"\x00*\x00connection";N;s:8:"\x00*\x00table";N;s:13:"\x00*\x00primaryKey";s:2:"id";s:10:"\x00*\x00keyType";s:3:"int";s:12:"incrementing";b:1;s:7:"\x00*\x00with";a:0:{}s:12:"\x00*\x00withCount";a:0:{}s:10:"\x00*\x00perPage";i:15;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:13:"\x00*\x00attributes";a:19:{s:2:"id";i:27373;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"00:00:00";s:8:"end_time";s:8:"06:00:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:1;s:8:"saturday";i:1;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:11:"\x00*\x00original";a:19:{s:2:"id";i:27373;s:10:"account_id";i:83920;s:13:"restaurant_id";i:11798;s:10:"start_time";s:8:"00:00:00";s:8:"end_time";s:8:"06:00:00";s:6:"monday";i:1;s:7:"tuesday";i:1;s:9:"wednesday";i:1;s:8:"thursday";i:1;s:6:"friday";i:1;s:8:"saturday";i:1;s:6:"sunday";i:1;s:7:"message";s:0:"";s:6:"pickup";i:1;s:8:"delivery";i:1;s:6:"dinein";i:1;s:17:"ordering_disabled";i:1;s:11:"category_id";N;s:25:"show_category_when_closed";i:0;}s:8:"\x00*\x00casts";a:0:{}s:8:"\x00*\x00dates";a:0:{}s:13:"\x00*\x00dateFormat";N;s:10:"\x00*\x00appends";a:0:{}s:9:"\x00*\x00events";a:0:{}s:14:"\x00*\x00observables";a:0:{}s:12:"\x00*\x00relations";a:0:{}s:10:"\x00*\x00touches";a:0:{}s:10:"\x00*\x00visible";a:0:{}s:11:"\x00*\x00fillable";a:0:{}s:10:"\x00*\x00guarded";a:1:{i:0;s:1:"*";}}}"
    
  3. 86400
    
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
ClosedHours.class.php
        if ($aObj || is_null($aObj)) {
            return $aObj;
        }
 
        $db_conn = DB::conn();
        $rbs = array();
        if ($cid && $isHiddenToCustomers) {
            $sql .= ' AND show_category_when_closed = 0';
        }
        $sql = "SELECT * FROM ".ClosedHours::getTableName()." WHERE (restaurant_id = ? OR category_id = ?) ".$sql." ORDER BY id DESC";
        $db_conn->bindParameter($sql, 1, $rid, "integer");
        $db_conn->bindParameter($sql, 1, $cid, "integer");
        $result = $db_conn->query($sql);
        if ($result && $result->rowCount() > 0) {
            while ($row = $result->fetch()) {
                $ch = new ClosedHours();
                $ch->loadFromArray($row, true);
                $rbs[] = $ch;
            }
            Cache::SetArray($cacheKey, $rbs);
            return $rbs;
        }
        Cache::SetObject($cacheKey, null);
        return null;
    }
    
    public static function clearCache($rid, $cid = null) {
        global $days;
        $types = ['PICKUP', 'DINEIN', 'DELIVERY'];
        $isHiddenToCustomersArray = [0, 1];
        foreach ($days as $d) {
            foreach ($types as $t) {
                foreach ($isHiddenToCustomersArray as $isHiddenToCustomers) {
                    Cache::Delete('ch_'.($cid > 0? ('c'.$cid) : ('r'.$rid)).'_'.mb_strtolower($d).'_'.$t.'_'.$isHiddenToCustomers);
                }
            }
        }
    }
 
    public function toString() {
Arguments
  1. "ch_r11798_sunday_PICKUP_0"
    
  2. array:2 [
      0 => ClosedHours {}
      1 => ClosedHours {}
    ]
    
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
ClosedHours.class.php
        }
        if (!$time) {
            $time = $restaurant->getLocalTime();
        }
        $closedHours = ClosedHours::getByDateAndCategoryAndType($time, $category->getId(), $orderType, $isHiddenToCustomers);
        if (is_array($closedHours) && count($closedHours) > 0) {
            return $closedHours;
        }
        //check parent category too
        if ($category->getParentId()) {
            $closedHours = ClosedHours::getByDateAndCategoryAndType($time, $category->getParentId(), $orderType, $isHiddenToCustomers);
            if (is_array($closedHours) && count($closedHours) > 0) {
                return $closedHours;
            }
        }
        return false;
    }
 
    public static function getByDateAndRestaurantAndType($time = null, $rid = -1, $type = 'PICKUP') {
        return ClosedHours::getByDateAndTypeAndRestaurantOrCategory($time, $rid, null, $type);
    }
 
    public static function getByDateAndCategoryAndType($time = null, $cid = null, $type = 'PICKUP', $isHiddenToCustomers = false) {
        return ClosedHours::getByDateAndTypeAndRestaurantOrCategory($time, -1, $cid, $type, $isHiddenToCustomers);
    }
 
    public static function getByDateAndTypeAndRestaurantOrCategory($time = null, $rid = -1, $cid = -1, $type = 'PICKUP', $isHiddenToCustomers = false) {
        $day = mb_strtolower(date('l', $time));
        $sql = " AND ".$day." = 1";
 
        if (!$type) {
            $type = 'PICKUP';
        }
        switch ($type) {
            case 'PICKUP':
                $sql .= " AND pickup=1 ";
                break;
            case 'DELIVERY':
                $sql .= " AND delivery=1 ";
                break;
Arguments
  1. 1765699200
    
  2. 11798
    
  3. null
    
  4. "PICKUP"
    
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
                if (empty($startEndArray[$i-1]['00:00']) && $prevclose < $prevopen) {
                    $startEndArray[$i-1]['00:00'] = $prevclose;
                    $prevDayClose = $prevclose;
                }
            }
        }
 
        //if there are holiday hours for this day - only return these hours
        $startEndInvalidArray = [];
        if (!$excludingClosedHours) {
            $holidayHours = HolidayHours::getByDateAndRestaurantAndType(date('Y-m-d 00:00:00', $dateTimestamp), $this->getId(), $cart->getBaseOrderType());
            if (is_object($holidayHours)) {
                $startTime     = date('H:i', strtotime($holidayHours->getStartHour()));
                $endTime       = date('H:i', strtotime($holidayHours->getEndHour()));
                $startEndArray = [[$startTime => $endTime]];
                $openTimes = [$startTime];
            }
 
            //remove times from closed hours
            $closedHours = ClosedHours::getByDateAndRestaurantAndType($dateTimestamp, $this->getId(), $cart->getBaseOrderType());
            if (!is_object($holidayHours) && is_array($closedHours) && count($closedHours) > 0) {
                foreach ($closedHours as $h) {
                    $startTime              = date('H:i', strtotime($h->getStartTime()));
                    $endTime                = date('H:i', strtotime($h->getEndTime()));
                    $startEndInvalidArray[] = [$startTime => $endTime];
                }
            }
        }
 
        //menu available times
        $prevDayMenusClose = null;
        $allPrevDayMenuClosed = true;
        $onePrevDayMenuClosed = false;
        $getTimesForAnyMenus = false;
        if ($menus === null) {
            $menus = $cart->getMenus();
        }
        if (!count($menus)) {
            $menus = $this->getActiveMenus(true);
            $getTimesForAnyMenus = true;
Arguments
  1. 1765699200
    
  2. 11798
    
  3. "PICKUP"
    
/
home
/
deploy
/
EHungry-3-boyan
/
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), $excludeClosedHours, $menus, $ignoreOrderingDaysLimit, $excludeHoursPastClosing);
                if (count($times)) {
                    $ymd = date('Y-m-d', $currentLocalTime);
                    $availableDates[$ymd] = $ymd;
                }
            }
        }
 
        $cart->setBaseOrderType($savedOrderType);
        $cart->updateToSession();
 
        $cache[$cacheKey] = $availableDates;
 
        if ($returnAsKeys) {
            return $availableDates;
        } else {
            return array_values($availableDates);
        }
    }
 
    public function hasAvailableDays($selectedTime, $orderType) {
Arguments
  1. DateTime @1765699200 {
      date: 2025-12-14 00:00:00.0 America/Los_Angeles (-08:00)
    }
    
  2. false
    
  3. []
    
  4. false
    
  5. false
    
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
     * @param bool $ignoreDaysLimit
     * @param Menu[] $menus
     * @return array
     * @throws Exception
     */
    public function getOrderingDaysForAnyType($ignoreDaysLimit = false, $menus = []) {
        // Use a static variable to store cache within the request scope, so we don't recalculate this on every call within the request
        static $cache = [];
        $cacheKey = ($ignoreDaysLimit ? '1' : '0') .
            ($menus === null ? 'null' : md5(json_encode($menus)));
 
        if (isset($cache[$cacheKey])) {
            return $cache[$cacheKey];
        }
 
        $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, $menus);
        }
        if (isset($orderTypes["DELIVERY"])) {
            $availableDates = array_merge($availableDates, $this->getAvailableDates($dateTime, 'DELIVERY', false, $ignoreDaysLimit, false, $menus));
        }
        sort($availableDates);
        $cache[$cacheKey] = $availableDates;
        return $availableDates;
    }
 
    /**
     * @param DateTime $date
     * @return array
     */
    public function getAvailableTimeSlots($date) {
        //time slots
        if ($this->time_slots_enabled) {
            $validTimes = $this->getAvailableTimes($date);
            $timeSlots = RestaurantTimeSlot::getForRestaurant($this);
            $validTimeSlots = [];
 
Arguments
  1. DateTime @1765180800 {
      date: 2025-12-08 00:00:00.0 America/Los_Angeles (-08:00)
    }
    
  2. "PICKUP"
    
  3. false
    
  4. false
    
  5. false
    
  6. []
    
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
classes
/
Restaurant.class.php
        $cart->setBaseOrderType($savedOrderType);
        $cart->updateToSession();
 
        $cache[$cacheKey] = $availableDates;
 
        if ($returnAsKeys) {
            return $availableDates;
        } else {
            return array_values($availableDates);
        }
    }
 
    public function hasAvailableDays($selectedTime, $orderType) {
        $dateTime = new DateTime(date('Y-m-d', $selectedTime));
        $availableDates = $this->getAvailableDates($dateTime, $orderType, true, true, false, []);
        return count($availableDates) > 0;
    }
 
    public function hasOrderingDaysForAnyType() {
        return count($this->getOrderingDaysForAnyType()) > 0;
    }
 
    /**
     * @param bool $ignoreDaysLimit
     * @param Menu[] $menus
     * @return array
     * @throws Exception
     */
    public function getOrderingDaysForAnyType($ignoreDaysLimit = false, $menus = []) {
        // Use a static variable to store cache within the request scope, so we don't recalculate this on every call within the request
        static $cache = [];
        $cacheKey = ($ignoreDaysLimit ? '1' : '0') .
            ($menus === null ? 'null' : md5(json_encode($menus)));
 
        if (isset($cache[$cacheKey])) {
            return $cache[$cacheKey];
        }
 
        $orderTypes = $this->getEnabledBaseOrderTypes();
        $availableDates = [];
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
lib
/
global.php
            if ($restaurant->getPublicOrderingIsClosedForever()) {
                return $returnClosedUntilTime ? 'Indefinitely' : 'Online ordering is not currently offered at this location.';
            }
 
            if ($restaurant->public_ordering_closed_until) {
                return $restaurant->getLocalPublicOrderingClosedUntilText($returnClosedUntilTime);
            }
        }
        if (is_string($defaultMsg)) {
            return $returnClosedUntilTime ? 'Indefinitely' : $defaultMsg;
        }
 
        return $returnClosedUntilTime ? 'Indefinitely' : ($result?: true); //in case result is an empty string
    }
 
    if ($skipLoginCheck && is_object($restaurant) && $restaurant->isOrderingClosed()) {
        return true;
    }
 
    if (is_object($restaurant) && !$restaurant->hasOrderingDaysForAnyType()) {
        if ($restaurant->same_day_orders_only || $restaurant->asap_orders_only) {
            $firstAvailableTime = $restaurant->getFirstAvailableTime();
            return $returnClosedUntilTime ? $firstAvailableTime
                : ('Online ordering is closed' . ($firstAvailableTime ? (' until ' . date('F jS \a\t g:iA', $firstAvailableTime)) : ''));
        }
        return $returnClosedUntilTime ? strtotime('+200 years') : 'Online ordering is closed';
    }
 
    return false;
}
 
function addErrorDialogueToLoadEvent() {
    if (!isset($_REQUEST['hide_error_dialog'])) {
        $errStr = str_replace("'", "&lsquo;", $_REQUEST['errors']);
        $errStr = preg_replace('/\r\n/', ' ', $errStr);
        if ($errStr) {
            return '<script type="text/javascript" defer="defer">
            var tmpOnload = window.onload;
            window.onload = function() {
                if(tmpOnload) tmpOnload();
/
home
/
deploy
/
EHungry-3-boyan
/
Web
/
model3.0
/
customer
/
ordering3.php
if ($account->getSkipTimeWarning()) {
    $_SESSION['time_ok'] = true;
}
 
if (shouldShowAdminBypassMessageForCheckout()) {
    setStatus(ONLINE_ORDERING_BYPASS_MESSAGE);
}
 
if (is_object($restaurant) && is_object($menu) && is_object($category) && isset($_REQUEST['item_id'])) {
    $item = new MenuItem($_REQUEST['item_id']);
    $item->setQuantity(1);
    if (!$item->isInMenu($menu->getId())) {
        redirectToOrderingWithError('The selected menu item is not available in the selected menu.', [$restaurant, $menu, $category]);
    }
 
    if (!MenuItemAvailability::isAvailableForMenuItemAndTime($item->getId(), $restaurant->getLocalTime())) {
        redirectToOrderingWithError('The selected menu item has limited availability. It is not currently offered at this time.', [$restaurant, $menu, $category]);
    }
 
    $closedMsg = isOrderingClosed(CLOSED_MSG_RESTAURANT);
 
    if ($closedMsg && is_string($closedMsg)) {
        setStatus($closedMsg);
    }
 
    if (isset($_REQUEST['price_id'])) {
        $p = new MenuItemPrice($_REQUEST['price_id']);
        if ($p->getMenuItemId() == $item->getId()) {
            $selected_price = $p;
            $selectPriceId = $p->getId();
        }
    }
}
 
$_REQUEST['_PAGETITLE'] = '';
$_REQUEST['_PAGEDESCRIPTION'] = '';
$_REQUEST['_PAGEH2'] = '';
$menuText = '';
$orderTypeText = '';
//check that our order level contains the necessary bits of valid data, otherwise redirect back up
Arguments
  1. "RESTAURANT"
    
/
home
/
deploy
/
EHungry-3-boyan
/
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-3-boyan/Web/model3.0/customer/ordering3.php"
    
/
home
/
deploy
/
EHungry-3-boyan
/
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-3-boyan/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
empty
empty
Key Value
PHPSESSID
"0fg4f86oj1m0t75metni037ums"
Key Value
loc
"en_US"
customer_account_id
83920
cart
Cart {}
restaurant_id
11798
app_banner_shown
true
status
array:2 [
  1 => []
  2 => []
]
redirect_form
"checkout"
menu_id
14851
Key Value
UNIQUE_ID
"aTb0jfZK4wkSWgNRjb5LwQAAAAo"
SCRIPT_URL
"/restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
SCRIPT_URI
"http://www.springroll.com.3.boyan.ehungry.net/restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
HTTP_HOST
"www.springroll.com.3.boyan.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.186"
HTTP_X_FORWARDED_FOR
"216.73.216.186"
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=0fg4f86oj1m0t75metni037ums"
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.3.boyan.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-3-boyan/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-3-boyan/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-3-boyan/Web/index.php"
REMOTE_PORT
"48516"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
REQUEST_URI
"/restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
SCRIPT_NAME
"/restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
PHP_SELF
"/restaurant/eddies2gostockbridge/order/main/tenders-combo/4-pcs-chicken-tender-combo"
REQUEST_TIME_FLOAT
1765209229.037
REQUEST_TIME
1765209229
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