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: #9 RedisException in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:69 #8 Redis:setex in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:69 #7 Cache:Set in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:53 #6 Cache:SetObject in /home/deploy/EHungry-8-simon/Web/classes/BaseClass.class.php:764 #5 BaseClass:cacheSet in /home/deploy/EHungry-8-simon/Web/classes/BaseClass.class.php:657 #4 BaseClass:findNew in /home/deploy/EHungry-8-simon/Web/classes/BaseClass.class.php:672 #3 BaseClass:find in /home/deploy/EHungry-8-simon/Web/classes/BaseClass.class.php:145 #2 BaseClass:__construct in /home/deploy/EHungry-8-simon/Web/classes/MenuItem.class.php:249 #1 MenuItem:getByAccountAndUrlTag in /home/deploy/EHungry-8-simon/Web/controllers/customer.php:430 #0 require in /home/deploy/EHungry-8-simon/Web/index.php:30
Stack frames (10)
9
RedisException
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
69
8
Redis
setex
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
69
7
Cache
Set
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
53
6
Cache
SetObject
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
764
5
BaseClass
cacheSet
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
657
4
BaseClass
findNew
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
672
3
BaseClass
find
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
145
2
BaseClass
__construct
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
MenuItem.class.php
249
1
MenuItem
getByAccountAndUrlTag
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
controllers
/
customer.php
430
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. "bc_menu_item_1635894"
    
  2. 86400
    
  3. "O:8:"MenuItem":42:{s:6:"prices";a:0:{}s:6:"addons";a:0:{}s:13:"selectedPrice";N;s:4:"uuid";s:0:"";s:7:"ccat_id";i:-1;s:4:"ccat";N;s:8:"priority";N;s:8:"quantity";N;s:18:"original_unique_id";N;s:20:"special_instructions";N;s:15:"discount_amount";N;s:18:"buddy_display_name";N;s:12:"menubuddy_id";N;s:12:"source_index";N;s:9:"is_upsell";N;s:15:"\x00*\x00defaultImage";N;s:11:"\x00*\x00fillable";a:4:{i:0;s:8:"is_shown";i:1;s:14:"is_unavailable";i:2;s:12:"display_name";i:3;s:11:"description";}s:10:"\x00*\x00appends";a:2:{i:0;s:12:"single_price";i:1;s:12:"shown_status";}s:10:"\x00*\x00visible";a:5:{i:0;s:2:"id";i:1;s:11:"category_id";i:2;s:12:"display_name";i:3;s:11:"description";i:4;s:12:"shown_status";}s:8:"\x00*\x00casts";a:5:{s:8:"is_shown";s:7:"boolean";s:8:"is_pizza";s:7:"boolean";s:12:"is_orderable";s:7:"boolean";s:14:"is_unavailable";s:7:"boolean";s:19:"is_priced_per_extra";s:7:"boolean";}s:12:"pdfPageCount";i:0;s:10:"timestamps";b:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:13:"\x00*\x00connection";s:7:"default";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:45:{s:2:"id";i:1635894;s:12:"display_name";s:22:"54. Beef Egg Foo Young";s:11:"description";s:0:"";s:16:"checkout_message";s:0:"";s:8:"is_shown";i:1;s:10:"account_id";i:62124;s:12:"number_sales";i:0;s:10:"is_taxable";i:1;s:13:"min_prep_time";i:0;s:22:"min_required_per_order";i:1;s:23:"max_available_per_order";i:0;s:21:"per_order_is_per_item";i:0;s:12:"is_open_item";i:0;s:21:"is_shown_to_employees";i:1;s:8:"is_pizza";i:0;s:12:"is_orderable";i:1;s:13:"has_no_prices";i:0;s:14:"quantity_label";s:0:"";s:13:"phonetic_name";s:0:"";s:16:"freepos_category";s:0:"";s:19:"freepos_description";s:0:"";s:18:"freepos_tax_string";s:0:"";s:15:"freepos_spooler";s:0:"";s:19:"is_priced_per_extra";i:0;s:19:"custom_price_script";s:0:"";s:19:"post_item_action_id";i:0;s:25:"hide_special_instructions";i:0;s:9:"import_id";i:0;s:6:"indent";i:0;s:8:"standout";i:0;s:13:"is_label_only";i:0;s:21:"original_menu_item_id";i:0;s:21:"available_order_types";i:7;s:7:"url_tag";s:21:"54-beef-egg-foo-young";s:8:"tax_rate";N;s:14:"tax_rate_label";N;s:14:"is_unavailable";i:0;s:14:"reset_disabled";i:0;s:6:"iac_id";N;s:12:"supermenu_id";N;s:17:"pos_print_kitchen";i:0;s:15:"pos_print_label";i:0;s:8:"tax_code";N;s:12:"english_name";s:0:"";s:12:"chinese_name";s:0:"";}s:11:"\x00*\x00original";a:45:{s:2:"id";i:1635894;s:12:"display_name";s:22:"54. Beef Egg Foo Young";s:11:"description";s:0:"";s:16:"checkout_message";s:0:"";s:8:"is_shown";i:1;s:10:"account_id";i:62124;s:12:"number_sales";i:0;s:10:"is_taxable";i:1;s:13:"min_prep_time";i:0;s:22:"min_required_per_order";i:1;s:23:"max_available_per_order";i:0;s:21:"per_order_is_per_item";i:0;s:12:"is_open_item";i:0;s:21:"is_shown_to_employees";i:1;s:8:"is_pizza";i:0;s:12:"is_orderable";i:1;s:13:"has_no_prices";i:0;s:14:"quantity_label";s:0:"";s:13:"phonetic_name";s:0:"";s:16:"freepos_category";s:0:"";s:19:"freepos_description";s:0:"";s:18:"freepos_tax_string";s:0:"";s:15:"freepos_spooler";s:0:"";s:19:"is_priced_per_extra";i:0;s:19:"custom_price_script";s:0:"";s:19:"post_item_action_id";i:0;s:25:"hide_special_instructions";i:0;s:9:"import_id";i:0;s:6:"indent";i:0;s:8:"standout";i:0;s:13:"is_label_only";i:0;s:21:"original_menu_item_id";i:0;s:21:"available_order_types";i:7;s:7:"url_tag";s:21:"54-beef-egg-foo-young";s:8:"tax_rate";N;s:14:"tax_rate_label";N;s:14:"is_unavailable";i:0;s:14:"reset_disabled";i:0;s:6:"iac_id";N;s:12:"supermenu_id";N;s:17:"pos_print_kitchen";i:0;s:15:"pos_print_label";i:0;s:8:"tax_code";N;s:12:"english_name";s:0:"";s:12:"chinese_name";s:0:"";}s:8:"\x00*\x00dates";a:0:{}s:13:"\x00*\x00dateFormat";N;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*\x00guarded";a:1:{i:0;s:1:"*";}}"
    
/
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. "bc_menu_item_1635894"
    
  2. "O:8:"MenuItem":42:{s:6:"prices";a:0:{}s:6:"addons";a:0:{}s:13:"selectedPrice";N;s:4:"uuid";s:0:"";s:7:"ccat_id";i:-1;s:4:"ccat";N;s:8:"priority";N;s:8:"quantity";N;s:18:"original_unique_id";N;s:20:"special_instructions";N;s:15:"discount_amount";N;s:18:"buddy_display_name";N;s:12:"menubuddy_id";N;s:12:"source_index";N;s:9:"is_upsell";N;s:15:"\x00*\x00defaultImage";N;s:11:"\x00*\x00fillable";a:4:{i:0;s:8:"is_shown";i:1;s:14:"is_unavailable";i:2;s:12:"display_name";i:3;s:11:"description";}s:10:"\x00*\x00appends";a:2:{i:0;s:12:"single_price";i:1;s:12:"shown_status";}s:10:"\x00*\x00visible";a:5:{i:0;s:2:"id";i:1;s:11:"category_id";i:2;s:12:"display_name";i:3;s:11:"description";i:4;s:12:"shown_status";}s:8:"\x00*\x00casts";a:5:{s:8:"is_shown";s:7:"boolean";s:8:"is_pizza";s:7:"boolean";s:12:"is_orderable";s:7:"boolean";s:14:"is_unavailable";s:7:"boolean";s:19:"is_priced_per_extra";s:7:"boolean";}s:12:"pdfPageCount";i:0;s:10:"timestamps";b:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:13:"\x00*\x00connection";s:7:"default";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:45:{s:2:"id";i:1635894;s:12:"display_name";s:22:"54. Beef Egg Foo Young";s:11:"description";s:0:"";s:16:"checkout_message";s:0:"";s:8:"is_shown";i:1;s:10:"account_id";i:62124;s:12:"number_sales";i:0;s:10:"is_taxable";i:1;s:13:"min_prep_time";i:0;s:22:"min_required_per_order";i:1;s:23:"max_available_per_order";i:0;s:21:"per_order_is_per_item";i:0;s:12:"is_open_item";i:0;s:21:"is_shown_to_employees";i:1;s:8:"is_pizza";i:0;s:12:"is_orderable";i:1;s:13:"has_no_prices";i:0;s:14:"quantity_label";s:0:"";s:13:"phonetic_name";s:0:"";s:16:"freepos_category";s:0:"";s:19:"freepos_description";s:0:"";s:18:"freepos_tax_string";s:0:"";s:15:"freepos_spooler";s:0:"";s:19:"is_priced_per_extra";i:0;s:19:"custom_price_script";s:0:"";s:19:"post_item_action_id";i:0;s:25:"hide_special_instructions";i:0;s:9:"import_id";i:0;s:6:"indent";i:0;s:8:"standout";i:0;s:13:"is_label_only";i:0;s:21:"original_menu_item_id";i:0;s:21:"available_order_types";i:7;s:7:"url_tag";s:21:"54-beef-egg-foo-young";s:8:"tax_rate";N;s:14:"tax_rate_label";N;s:14:"is_unavailable";i:0;s:14:"reset_disabled";i:0;s:6:"iac_id";N;s:12:"supermenu_id";N;s:17:"pos_print_kitchen";i:0;s:15:"pos_print_label";i:0;s:8:"tax_code";N;s:12:"english_name";s:0:"";s:12:"chinese_name";s:0:"";}s:11:"\x00*\x00original";a:45:{s:2:"id";i:1635894;s:12:"display_name";s:22:"54. Beef Egg Foo Young";s:11:"description";s:0:"";s:16:"checkout_message";s:0:"";s:8:"is_shown";i:1;s:10:"account_id";i:62124;s:12:"number_sales";i:0;s:10:"is_taxable";i:1;s:13:"min_prep_time";i:0;s:22:"min_required_per_order";i:1;s:23:"max_available_per_order";i:0;s:21:"per_order_is_per_item";i:0;s:12:"is_open_item";i:0;s:21:"is_shown_to_employees";i:1;s:8:"is_pizza";i:0;s:12:"is_orderable";i:1;s:13:"has_no_prices";i:0;s:14:"quantity_label";s:0:"";s:13:"phonetic_name";s:0:"";s:16:"freepos_category";s:0:"";s:19:"freepos_description";s:0:"";s:18:"freepos_tax_string";s:0:"";s:15:"freepos_spooler";s:0:"";s:19:"is_priced_per_extra";i:0;s:19:"custom_price_script";s:0:"";s:19:"post_item_action_id";i:0;s:25:"hide_special_instructions";i:0;s:9:"import_id";i:0;s:6:"indent";i:0;s:8:"standout";i:0;s:13:"is_label_only";i:0;s:21:"original_menu_item_id";i:0;s:21:"available_order_types";i:7;s:7:"url_tag";s:21:"54-beef-egg-foo-young";s:8:"tax_rate";N;s:14:"tax_rate_label";N;s:14:"is_unavailable";i:0;s:14:"reset_disabled";i:0;s:6:"iac_id";N;s:12:"supermenu_id";N;s:17:"pos_print_kitchen";i:0;s:15:"pos_print_label";i:0;s:8:"tax_code";N;s:12:"english_name";s:0:"";s:12:"chinese_name";s:0:"";}s:8:"\x00*\x00dates";a:0:{}s:13:"\x00*\x00dateFormat";N;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*\x00guarded";a:1:{i:0;s:1:"*";}}"
    
  3. 86400
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
    }
 
    /**
     * Returns the cached object, if it {@link BaseClass::SHOULD_BE_CACHED} and valid, given the $id.
     * @param $id
     * @return false|static
     */
    protected function cacheGet($id) {
        if (static::SHOULD_BE_CACHED && $id > 0 && $cache = Cache::GetObject($this->getCacheKey($id))) {
            return $cache;
        }
        return false;
    }
 
    /**
     * Caches the current object, if {@link BaseClass::SHOULD_BE_CACHED}.
     */
    protected function cacheSet() {
        if (static::SHOULD_BE_CACHED && $this->id > 0) {
            Cache::SetObject($this->getCacheKey(), $this, static::CACHE_EXPIRATION);
        }
    }
 
    /**
     * Removes the current object from cache, if {@link BaseClass::SHOULD_BE_CACHED}.
     */
    public function cacheDelete() {
        if (static::SHOULD_BE_CACHED && $this->id > 0) {
            Cache::Delete($this->getCacheKey());
        }
    }
 
    /**
     * Removes all objects from cache, if {@link BaseClass::SHOULD_BE_CACHED}.
     */
    public static function cacheDeleteAll($chunkSize = self::CACHE_DELETE_CHUNK_SIZE) {
        if (static::SHOULD_BE_CACHED) {
            static::chunk($chunkSize, function ($chunk) {
                foreach ($chunk as $row) {
                    $row->cacheDelete();
Arguments
  1. "bc_menu_item_1635894"
    
  2. MenuItem {}
    
  3. 86400
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
     * @param int|int[] $id
     * @param array $columns
     * @return static|Collection|static[]|null
     * @todo why isn't this protected?
     * @fixme side-effect of this workaround: the cache is silently skipped when running query-modifiers like ResellerUser::withoutGlobalScope('main_resellers')->find(123)
     */
    public function findNew($id, $columns = ['*']) {
        if (is_array($id)) {
            return $this->directFind($id, $columns);
        }
 
        if ($cached = $this->cacheGet($id)) {
            return $cached;
        }
 
        /** @var static $result */
        $result = $this->directFind($id, $columns);
 
        if ($result && $columns == ['*']) {
            $result->cacheSet();
        }
 
        return $result;
    }
 
    /**
     * Finds one or more entries in the database. In case of single-finds, checks the cache layer first.
     * @see BaseClass::SHOULD_BE_CACHED
     * @see Cache
     * @param int|int[] $id
     * @param array $columns
     * @return Collection|static|static[]|null
     */
    public static function find($id, $columns = ['*']) {
        return (new static)->findNew($id, $columns);
    }
 
    //FIXME: we're missing cached versions for findOrFail and findOrNew, at the very least
 
    /** @deprecated use {@link save()} instead */
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
        /** @var static $result */
        $result = $this->directFind($id, $columns);
 
        if ($result && $columns == ['*']) {
            $result->cacheSet();
        }
 
        return $result;
    }
 
    /**
     * Finds one or more entries in the database. In case of single-finds, checks the cache layer first.
     * @see BaseClass::SHOULD_BE_CACHED
     * @see Cache
     * @param int|int[] $id
     * @param array $columns
     * @return Collection|static|static[]|null
     */
    public static function find($id, $columns = ['*']) {
        return (new static)->findNew($id, $columns);
    }
 
    //FIXME: we're missing cached versions for findOrFail and findOrNew, at the very least
 
    /** @deprecated use {@link save()} instead */
    public function store() {
        return $this->save();
    }
 
    /**
     * Overrides the original save to return the generated ID.
     * After saving, caching ({@link SHOULD_BE_CACHED}) and logging ({@link willLogChanges()}/{@link loggingChanges()})
     * are done, if enabled.
     * @param array $options The only option available is "touch" (which is true by default); setting it to false will
     *                       disable "touching" parent relationships (aka belongsTo/belongsToMany) listed in
     *                       {@link $touches}, which updates their timestamps upon a successful save.
     *                       See https://laravel.com/docs/5.4/eloquent-relationships#touching-parent-timestamps
     * @return bool|int Returns the ID in case of a successful operation, or false instead.
     */
    public function save(array $options = []) {
Arguments
  1. 1635894
    
  2. array:1 [
      0 => "*"
    ]
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
BaseClass.class.php
     * Stores which classes had their logging behavior overwritten during runtime.
     * @var array
     * @see willLogChanges()
     */
    private static $overwrittenLogChanges = [];
 
    /**
     * @var array Indicates the fields which should be placed in the restaurant's timezone when casting to JSON
     * @see addDateAttributesToArray()
     * @see https://github.com/ehungry/EHungry/wiki/Data-standards#timezone-less-restaurant-times
     */
    protected static $restaurantDates = [];
 
    /**
     * @param int|array|ParameterHandler $idOrAttr An ID, so the entry is loaded from the database, or a list of attributes to be pre-filled into a new entry.
     */
    public function __construct($idOrAttr = null) {
        if (is_numeric($idOrAttr)) {
            //legacy behavior
            if ($entry = static::find($idOrAttr)) {
                //TODO: find a way to have default attributes respected in the same way Eloquent does - probably a mix of array_merge() and array_filter() (so we clear empty values from the found entry), or maybe we'll need a custom merger so the final attribute array doesn't miss any field
                $this->setRawAttributes($entry->attributes, true);
                $this->exists = true;
            }
            $this->setAttribute('id', $idOrAttr);
            parent::__construct();
        } elseif (is_array($idOrAttr) || $idOrAttr instanceof ParameterHandler) {
            parent::__construct($idOrAttr); //default Eloquent behavior + our custom fill()
        } else {
            $this->setAttribute('id', -1); //FIXME: legacy behavior as well... can we ditch this someday please????
            parent::__construct();
        }
    }
 
    /**
     * We've overwritten the original query builder to include extra methods :)
     * @param \Illuminate\Database\Query\Builder $query
     * @return Builder|EloquentModel|eHungry\Illuminate\Database\Eloquent\Builder
     */
    public function newEloquentBuilder($query) {
Arguments
  1. 1635894
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
MenuItem.class.php
            }
        }
        return false;
    }
 
    public function onDeleting() {
        $this->upsellItems()->delete();
        $this->upsellableItems()->delete();
        return true;
    }
 
    public static function getByAccountAndUrlTag($aid, $tag) {
        $db_conn = DB::conn();
        $sql = "SELECT id FROM ".MenuItem::getTableName()." WHERE account_id = ? AND url_tag = ?";
        $db_conn->bindParameter($sql, 1, $aid, 'integer');
        $db_conn->bindParameter($sql, 1, $tag, 'string');
        $result = $db_conn->query($sql);
        if ($result && $result->rowCount() > 0) {
            if ($row = $result->fetch()) {
                return new MenuItem($row['id']);
            }
        }
        return null;
    }
 
    /**
     * Returns an HTML string in the format of "qty x $9.99"
     * @return string
     */
    public function getCalculatedPricesByQuantity() {
        $p = $this->getSelectedPrice();
        if ($p) {
            if ($p->getOriginalPriceValue()) {
                if ($p->getMaxOverrideQuantity() > 0 && $this->getQuantity() > $p->getMaxOverrideQuantity()) {
                    return $p->getMaxOverrideQuantity() . ' x <span id="cartitemprice_'.$this->getUniqueId().'">' . intToMoneyString($this->getSelectedPrice()->getPriceValue()) . ' </span> ]<br />[ ' . ($this->getQuantity() - $p->getMaxOverrideQuantity()) . ' x <span id="cartitemprice_'.$this->getUniqueId().'">' . intToMoneyString($this->getSelectedPrice()->getOriginalPriceValue()) . '</span>';
                } else {
                    return $this->getQuantity() . ' x <span id="cartitemprice_'.$this->getUniqueId().'">' . intToMoneyString($this->getSelectedPrice()->getPriceValue()) . '</span>';
                }
            } else {
                return $this->getQuantity() . ' x <span id="cartitemprice_'.$this->getUniqueId().'">' . intToMoneyString($this->getSelectedPrice()->getPriceValue()) . '</span>';
Arguments
  1. 1635894
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
controllers
/
customer.php
                                    $category->setUrlTag($v);
                                    $category->setDisplayName('All Menu Items');
                                    $category->setMenuId($menu->id);
                                    $_REQUEST['category_id'] = -1;
                                } elseif ($v == 'popular-items') {
                                    $category = new Category(-1);
                                    $category->setUrlTag($v);
                                    $category->setDisplayName('Popular Items');
                                    $category->setMenuId($menu->id);
                                    $_REQUEST['category_id'] = -1;
                                } else {
                                    $category = Category::getByMenuAndUrlTag($menu->getId(), $v);
                                    if (is_object($category)) {
                                        $_REQUEST['category_id'] = $category->getId();
                                    }
                                }
                            }
                            break;
                        case 4:
                            $item = MenuItem::getByAccountAndUrlTag($account->getId(), $v);
                            if (is_object($item)) {
                                $_REQUEST['item_id'] = $item->getId();
                            }
                            break;
                        case 5:
                            if (is_numeric($v)) {
                                $_REQUEST['price_id'] = $v;
                            }
                            break;
                    }
                }
            }
        } elseif (is_numeric($tokens[0])) { //old direct link format eg /1234/5678 where 1234 is Restaurant ID and 5678 is Menu ID
            $restaurant = new Restaurant($tokens[0]);
            if (is_numeric($tokens[1])) {
                $menu = new Menu($tokens[1]);
            }
            if ($restaurant->getAccountId() == $account->getId()) {
                if (isset($menu) && is_object($menu) && $menu->getAccountId() == $account->getId()) {
                    redirectToOrdering([$restaurant, $menu]);
Arguments
  1. 62124
    
  2. "54-beef-egg-foo-young"
    
/
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/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
empty
empty
Key Value
PHPSESSID
"ehculgv8a99i0e251iqgnnoe3t"
Key Value
loc
"en_US"
customer_account_id
62124
restaurant_id
9057
menu_id
11491
Key Value
UNIQUE_ID
"aBGVqmqDeZzQILe95uiphgAAABM"
SCRIPT_URL
"/restaurant/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
SCRIPT_URI
"http://www.springroll.com.8.simon.ehungry.net/restaurant/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
HTTP_HOST
"www.springroll.com.8.simon.ehungry.net"
HTTP_X_REAL_IP
"3.16.24.18"
HTTP_X_FORWARDED_FOR
"3.16.24.18"
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=ehculgv8a99i0e251iqgnnoe3t"
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
"60510"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
REQUEST_URI
"/restaurant/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
SCRIPT_NAME
"/restaurant/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
PHP_SELF
"/restaurant/goodtastebabylonny/order/main/egg-foo-young/54-beef-egg-foo-young"
REQUEST_TIME_FLOAT
1745982890.12
REQUEST_TIME
1745982890
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