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: #15 RedisException in /home/deploy/EHungry-2-igor/Web/classes/Cache.class.php:69 #14 Redis:setex in /home/deploy/EHungry-2-igor/Web/classes/Cache.class.php:69 #13 Cache:Set in /home/deploy/EHungry-2-igor/Web/classes/Cache.class.php:57 #12 Cache:SetArray in /home/deploy/EHungry-2-igor/Web/classes/DbFields.php:53 #11 DbFields:getFields in /home/deploy/EHungry-2-igor/Web/classes/BaseClass.class.php:474 #10 BaseClass:setAttribute in /home/deploy/EHungry-2-igor/Web/classes/BaseClass.class.php:157 #9 BaseClass:__construct in /home/deploy/EHungry-2-igor/PHP/vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php:487 #8 Illuminate\Database\Eloquent\Model:newRelatedInstance in /home/deploy/EHungry-2-igor/PHP/vendor/illuminate/database/Eloquent/Concerns/HasRelationships.php:106 #7 Illuminate\Database\Eloquent\Model:belongsTo in /home/deploy/EHungry-2-igor/Web/classes/CustomDomain.class.php:21 #6 CustomDomain:account in /home/deploy/EHungry-2-igor/PHP/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:400 #5 Illuminate\Database\Eloquent\Model:getRelationshipFromMethod in /home/deploy/EHungry-2-igor/PHP/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php:386 #4 Illuminate\Database\Eloquent\Model:getRelationValue in /home/deploy/EHungry-2-igor/Web/classes/BaseClass.class.php:530 #3 BaseClass:getAttribute in /home/deploy/EHungry-2-igor/PHP/vendor/illuminate/database/Eloquent/Model.php:1279 #2 Illuminate\Database\Eloquent\Model:__get in /home/deploy/EHungry-2-igor/Web/lib/global.php:1118 #1 getAccountForRequest in /home/deploy/EHungry-2-igor/PHP/Global.php:622 #0 require in /home/deploy/EHungry-2-igor/Web/index.php:17
Stack frames (16)
15
RedisException
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
Cache.class.php
69
14
Redis
setex
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
Cache.class.php
69
13
Cache
Set
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
Cache.class.php
57
12
Cache
SetArray
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
DbFields.php
53
11
DbFields
getFields
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
BaseClass.class.php
474
10
BaseClass
setAttribute
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
BaseClass.class.php
157
9
BaseClass
__construct
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasRelationships.php
487
8
Illuminate
\
Database
\
Eloquent
\
Model
newRelatedInstance
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasRelationships.php
106
7
Illuminate
\
Database
\
Eloquent
\
Model
belongsTo
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
CustomDomain.class.php
21
6
CustomDomain
account
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasAttributes.php
400
5
Illuminate
\
Database
\
Eloquent
\
Model
getRelationshipFromMethod
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasAttributes.php
386
4
Illuminate
\
Database
\
Eloquent
\
Model
getRelationValue
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
BaseClass.class.php
530
3
BaseClass
getAttribute
/
vendor
/
illuminate
/
database
/
Eloquent
/
Model.php
1279
2
Illuminate
\
Database
\
Eloquent
\
Model
__get
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
lib
/
global.php
1118
1
getAccountForRequest
/
Global.php
622
0
require
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
index.php
17
/
home
/
deploy
/
EHungry-2-igor
/
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-2-igor
/
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. "describe_account_1"
    
  2. 86400
    
  3. "a:222:{s:11:"primary_fax";s:1:"S";s:13:"primary_phone";s:1:"S";s:3:"zip";s:1:"S";s:5:"state";s:1:"S";s:4:"city";s:1:"S";s:7:"street2";s:1:"S";s:7:"street1";s:1:"S";s:2:"id";s:1:"N";s:9:"id_string";s:1:"S";s:7:"url_tag";s:1:"S";s:17:"marketing_url_tag";s:1:"S";s:12:"display_name";s:1:"S";s:5:"email";s:1:"S";s:8:"password";s:1:"S";s:22:"password_last_modified";s:2:"DT";s:9:"tfa_since";s:2:"DT";s:10:"tfa_secret";s:1:"S";s:8:"timezone";s:1:"N";s:5:"suite";s:1:"S";s:9:"is_locked";s:1:"B";s:21:"is_permanently_closed";s:1:"B";s:14:"logo_file_name";s:1:"S";s:9:"app_title";s:1:"S";s:14:"app_page_title";s:1:"S";s:17:"always_show_title";s:1:"B";s:10:"custom_css";s:1:"S";s:13:"homepage_html";s:1:"S";s:12:"is_cancelled";s:1:"B";s:10:"created_at";s:2:"DT";s:11:"modified_at";s:2:"DT";s:23:"normalized_search_terms";s:1:"S";s:15:"enabled_modules";s:1:"S";s:22:"default_user_full_name";s:1:"S";s:10:"first_name";s:1:"S";s:9:"last_name";s:1:"S";s:9:"job_title";s:1:"S";s:19:"menubuddies_enabled";s:1:"B";s:24:"seo_description_disabled";s:1:"B";s:28:"self_print_campaigns_allowed";s:1:"B";s:16:"default_currency";s:1:"S";s:30:"reseller_user_invoice_currency";s:1:"S";s:20:"payment_processor_id";s:1:"N";s:23:"payment_processor_txkey";s:1:"S";s:25:"payment_processor_loginid";s:1:"S";s:28:"payment_processor_public_key";s:1:"S";s:20:"order_calendar_color";s:1:"S";s:23:"activity_calendar_color";s:1:"S";s:20:"other_calendar_color";s:1:"S";s:25:"order_calendar_foreground";s:1:"S";s:28:"activity_calendar_foreground";s:1:"S";s:25:"other_calendar_foreground";s:1:"S";s:13:"mobile_number";s:1:"S";s:14:"sms_is_enabled";s:1:"B";s:19:"hide_logo_in_header";s:1:"B";s:11:"template_id";s:1:"N";s:19:"website_template_id";s:1:"N";s:24:"website_template_enabled";s:1:"B";s:19:"preview_template_id";s:1:"N";s:21:"custom_admin_template";s:1:"B";s:23:"same_page_cart_disabled";s:1:"B";s:11:"show_coupon";s:1:"B";s:11:"show_search";s:1:"B";s:25:"menu_link_choose_location";s:1:"B";s:10:"is_all_ssl";s:1:"B";s:22:"custom_fax_layout_file";s:1:"S";s:7:"is_demo";s:1:"B";s:11:"is_billable";s:1:"B";s:14:"last_billed_on";s:2:"DT";s:16:"start_billing_on";s:2:"DT";s:12:"pdf_password";s:1:"S";s:11:"invite_code";s:1:"S";s:17:"custom_stylesheet";s:1:"S";s:19:"show_student_fields";s:1:"B";s:16:"reseller_user_id";s:1:"N";s:10:"logo_width";s:1:"N";s:11:"logo_height";s:1:"N";s:12:"directory_id";s:1:"N";s:15:"custom_survo_id";s:1:"S";s:19:"max_calls_per_order";s:1:"N";s:26:"old_ehungry_restaurant_ids";s:1:"S";s:22:"previous_homepage_html";s:1:"S";s:25:"order_confirmation_markup";s:1:"S";s:21:"additional_custom_css";s:1:"S";s:18:"individual_billing";s:1:"B";s:20:"category_list_layout";s:1:"S";s:30:"obscure_payment_info_on_orders";s:1:"S";s:17:"is_directory_only";s:1:"B";s:23:"desktop_client_password";s:1:"S";s:37:"desktop_client_password_last_modified";s:2:"DT";s:23:"manual_payment_captures";s:1:"B";s:27:"payment_processor_test_mode";s:1:"B";s:17:"affiliate_user_id";s:1:"N";s:24:"show_option_choice_names";s:1:"B";s:7:"tagline";s:1:"S";s:20:"print_order_xml_file";s:1:"S";s:17:"order_sequence_id";s:1:"N";s:24:"sequence_numbers_enabled";s:1:"B";s:25:"custom_ordersheet_message";s:1:"S";s:34:"customer_custom_ordersheet_message";s:1:"S";s:17:"account_tab_label";s:1:"S";s:18:"calendar_tab_label";s:1:"S";s:15:"order_tab_label";s:1:"S";s:19:"hide_customer_stats";s:1:"B";s:23:"show_errors_in_dialogue";s:1:"B";s:26:"show_advanced_addon_params";s:1:"B";s:25:"show_menus_simultaneously";s:1:"B";s:8:"is_store";s:1:"B";s:23:"default_menu_item_image";s:1:"S";s:34:"add_customer_receipt_to_ordersheet";s:1:"B";s:34:"add_new_customer_msg_to_ordersheet";s:1:"B";s:25:"is_nonstandard_ordersheet";s:1:"B";s:31:"permit_customer_order_deletions";s:1:"B";s:16:"hide_price_names";s:1:"B";s:29:"show_location_on_print_ticket";s:1:"B";s:20:"custom_rightbar_info";s:1:"S";s:30:"show_homepage_on_ordering_page";s:1:"B";s:21:"show_price_names_only";s:1:"B";s:21:"sms_send_by_secondary";s:1:"B";s:26:"hidden_registration_fields";s:1:"S";s:20:"allow_guest_checkout";s:1:"B";s:10:"force_bill";s:1:"B";s:20:"location_list_format";s:1:"S";s:20:"allow_client_scripts";s:1:"B";s:15:"has_mobile_site";s:1:"B";s:17:"last_suspended_on";s:2:"DT";s:8:"bill_day";s:1:"N";s:10:"force_efax";s:1:"B";s:14:"mobile_tablets";s:1:"B";s:14:"force_metrofax";s:1:"B";s:12:"social_links";s:1:"S";s:9:"home_link";s:1:"S";s:13:"embed_origins";s:1:"S";s:14:"copyright_name";s:1:"S";s:12:"pricing_plan";s:1:"N";s:21:"google_analytics_code";s:1:"S";s:31:"google_analytics_linker_domains";s:1:"S";s:26:"google_analytics_four_code";s:1:"S";s:15:"paypal_api_data";s:1:"S";s:16:"meta_description";s:1:"S";s:13:"meta_keywords";s:1:"S";s:19:"getresponse_api_key";s:1:"S";s:25:"getresponse_campaign_name";s:1:"S";s:23:"getresponse_campaign_id";s:1:"S";s:13:"email_service";s:1:"E";s:14:"phone_priority";s:1:"S";s:12:"sms_priority";s:1:"S";s:11:"fax_service";s:1:"E";s:18:"order_sms_priority";s:1:"S";s:19:"order_sms_hide_link";s:1:"B";s:27:"order_sms_show_account_name";s:1:"B";s:12:"fax_priority";s:1:"S";s:13:"admin_version";s:1:"N";s:20:"group_orders_enabled";s:1:"B";s:19:"auto_upsell_enabled";s:1:"B";s:25:"hide_special_instructions";s:1:"B";s:29:"special_instructions_required";s:1:"B";s:28:"special_instructions_details";s:1:"S";s:17:"homepage_override";s:1:"S";s:13:"site_redirect";s:1:"S";s:20:"admin_id_menu_access";s:1:"N";s:6:"use_km";s:1:"B";s:21:"default_ordering_page";s:1:"N";s:14:"cancelled_date";s:2:"DT";s:17:"validate_callback";s:1:"B";s:17:"skip_time_warning";s:1:"B";s:7:"api_key";s:1:"S";s:17:"facebook_pixel_id";s:1:"S";s:21:"constant_contact_code";s:1:"S";s:24:"constant_contact_form_id";s:1:"S";s:38:"yelp_reservations_calendar_widget_code";s:1:"S";s:21:"default_restaurant_id";s:1:"N";s:12:"allow_delete";s:1:"B";s:31:"sms_order_notifications_enabled";s:1:"B";s:36:"sms_order_notifications_for_delivery";s:1:"B";s:34:"sms_order_notifications_for_dinein";s:1:"B";s:34:"sms_order_notifications_for_pickup";s:1:"B";s:31:"sms_order_notifications_minutes";s:1:"B";s:25:"inventory_manager_enabled";s:1:"B";s:18:"how_heard_about_us";s:1:"S";s:26:"account_status_modified_at";s:2:"DT";s:25:"location_wording_singular";s:1:"S";s:35:"hide_restaurant_closed_checkout_msg";s:1:"B";s:32:"show_created_at_on_order_monitor";s:1:"B";s:25:"display_zero_dollar_items";s:1:"B";s:23:"show_cross_street_field";s:1:"B";s:18:"announcements_html";s:1:"S";s:21:"announcements_enabled";s:1:"B";s:26:"announcements_expired_date";s:2:"DT";s:23:"receipt_signature_shown";s:1:"B";s:23:"receipt_extra_tip_shown";s:1:"B";s:19:"receipt_email_shown";s:1:"B";s:20:"new_receipt_disabled";s:1:"B";s:15:"is_receipt_bold";s:1:"B";s:17:"receipt_font_size";s:1:"N";s:19:"announcements_place";s:1:"S";s:9:"logo_size";s:1:"S";s:23:"payment_options_enabled";s:1:"B";s:16:"open_graph_image";s:1:"S";s:35:"itsacheckmate_notifications_enabled";s:1:"B";s:16:"menu_api_webhook";s:1:"S";s:12:"menu_updated";s:1:"B";s:25:"pos_notifications_enabled";s:1:"B";s:36:"payment_aggregator_messaging_enabled";s:1:"B";s:21:"payment_aggregator_id";s:1:"N";s:17:"sales_tax_enabled";s:1:"N";s:8:"tax_code";s:1:"S";s:22:"shipday_enabled_status";s:1:"N";s:35:"print_orders_without_prices_enabled";s:1:"B";s:28:"deliver_by_ourselves_enabled";s:1:"B";s:36:"third_party_optimal_delivery_enabled";s:1:"B";s:35:"third_party_services_status_enabled";s:1:"B";s:18:"payment_aggregator";s:1:"E";s:12:"auto_billing";s:1:"B";s:35:"daily_summary_detailed_fees_enabled";s:1:"B";s:32:"springroll_announcements_enabled";s:1:"B";s:31:"springroll_announcements_copied";s:1:"B";s:29:"springroll_announcements_html";s:1:"S";s:37:"springroll_announcements_expired_date";s:2:"DT";s:30:"springroll_announcements_place";s:1:"S";s:20:"adjustments_disabled";s:1:"B";s:18:"google_pay_enabled";s:1:"B";s:23:"maximum_pp_order_amount";s:1:"N";}"
    
/
home
/
deploy
/
EHungry-2-igor
/
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. "describe_account_1"
    
  2. "a:222:{s:11:"primary_fax";s:1:"S";s:13:"primary_phone";s:1:"S";s:3:"zip";s:1:"S";s:5:"state";s:1:"S";s:4:"city";s:1:"S";s:7:"street2";s:1:"S";s:7:"street1";s:1:"S";s:2:"id";s:1:"N";s:9:"id_string";s:1:"S";s:7:"url_tag";s:1:"S";s:17:"marketing_url_tag";s:1:"S";s:12:"display_name";s:1:"S";s:5:"email";s:1:"S";s:8:"password";s:1:"S";s:22:"password_last_modified";s:2:"DT";s:9:"tfa_since";s:2:"DT";s:10:"tfa_secret";s:1:"S";s:8:"timezone";s:1:"N";s:5:"suite";s:1:"S";s:9:"is_locked";s:1:"B";s:21:"is_permanently_closed";s:1:"B";s:14:"logo_file_name";s:1:"S";s:9:"app_title";s:1:"S";s:14:"app_page_title";s:1:"S";s:17:"always_show_title";s:1:"B";s:10:"custom_css";s:1:"S";s:13:"homepage_html";s:1:"S";s:12:"is_cancelled";s:1:"B";s:10:"created_at";s:2:"DT";s:11:"modified_at";s:2:"DT";s:23:"normalized_search_terms";s:1:"S";s:15:"enabled_modules";s:1:"S";s:22:"default_user_full_name";s:1:"S";s:10:"first_name";s:1:"S";s:9:"last_name";s:1:"S";s:9:"job_title";s:1:"S";s:19:"menubuddies_enabled";s:1:"B";s:24:"seo_description_disabled";s:1:"B";s:28:"self_print_campaigns_allowed";s:1:"B";s:16:"default_currency";s:1:"S";s:30:"reseller_user_invoice_currency";s:1:"S";s:20:"payment_processor_id";s:1:"N";s:23:"payment_processor_txkey";s:1:"S";s:25:"payment_processor_loginid";s:1:"S";s:28:"payment_processor_public_key";s:1:"S";s:20:"order_calendar_color";s:1:"S";s:23:"activity_calendar_color";s:1:"S";s:20:"other_calendar_color";s:1:"S";s:25:"order_calendar_foreground";s:1:"S";s:28:"activity_calendar_foreground";s:1:"S";s:25:"other_calendar_foreground";s:1:"S";s:13:"mobile_number";s:1:"S";s:14:"sms_is_enabled";s:1:"B";s:19:"hide_logo_in_header";s:1:"B";s:11:"template_id";s:1:"N";s:19:"website_template_id";s:1:"N";s:24:"website_template_enabled";s:1:"B";s:19:"preview_template_id";s:1:"N";s:21:"custom_admin_template";s:1:"B";s:23:"same_page_cart_disabled";s:1:"B";s:11:"show_coupon";s:1:"B";s:11:"show_search";s:1:"B";s:25:"menu_link_choose_location";s:1:"B";s:10:"is_all_ssl";s:1:"B";s:22:"custom_fax_layout_file";s:1:"S";s:7:"is_demo";s:1:"B";s:11:"is_billable";s:1:"B";s:14:"last_billed_on";s:2:"DT";s:16:"start_billing_on";s:2:"DT";s:12:"pdf_password";s:1:"S";s:11:"invite_code";s:1:"S";s:17:"custom_stylesheet";s:1:"S";s:19:"show_student_fields";s:1:"B";s:16:"reseller_user_id";s:1:"N";s:10:"logo_width";s:1:"N";s:11:"logo_height";s:1:"N";s:12:"directory_id";s:1:"N";s:15:"custom_survo_id";s:1:"S";s:19:"max_calls_per_order";s:1:"N";s:26:"old_ehungry_restaurant_ids";s:1:"S";s:22:"previous_homepage_html";s:1:"S";s:25:"order_confirmation_markup";s:1:"S";s:21:"additional_custom_css";s:1:"S";s:18:"individual_billing";s:1:"B";s:20:"category_list_layout";s:1:"S";s:30:"obscure_payment_info_on_orders";s:1:"S";s:17:"is_directory_only";s:1:"B";s:23:"desktop_client_password";s:1:"S";s:37:"desktop_client_password_last_modified";s:2:"DT";s:23:"manual_payment_captures";s:1:"B";s:27:"payment_processor_test_mode";s:1:"B";s:17:"affiliate_user_id";s:1:"N";s:24:"show_option_choice_names";s:1:"B";s:7:"tagline";s:1:"S";s:20:"print_order_xml_file";s:1:"S";s:17:"order_sequence_id";s:1:"N";s:24:"sequence_numbers_enabled";s:1:"B";s:25:"custom_ordersheet_message";s:1:"S";s:34:"customer_custom_ordersheet_message";s:1:"S";s:17:"account_tab_label";s:1:"S";s:18:"calendar_tab_label";s:1:"S";s:15:"order_tab_label";s:1:"S";s:19:"hide_customer_stats";s:1:"B";s:23:"show_errors_in_dialogue";s:1:"B";s:26:"show_advanced_addon_params";s:1:"B";s:25:"show_menus_simultaneously";s:1:"B";s:8:"is_store";s:1:"B";s:23:"default_menu_item_image";s:1:"S";s:34:"add_customer_receipt_to_ordersheet";s:1:"B";s:34:"add_new_customer_msg_to_ordersheet";s:1:"B";s:25:"is_nonstandard_ordersheet";s:1:"B";s:31:"permit_customer_order_deletions";s:1:"B";s:16:"hide_price_names";s:1:"B";s:29:"show_location_on_print_ticket";s:1:"B";s:20:"custom_rightbar_info";s:1:"S";s:30:"show_homepage_on_ordering_page";s:1:"B";s:21:"show_price_names_only";s:1:"B";s:21:"sms_send_by_secondary";s:1:"B";s:26:"hidden_registration_fields";s:1:"S";s:20:"allow_guest_checkout";s:1:"B";s:10:"force_bill";s:1:"B";s:20:"location_list_format";s:1:"S";s:20:"allow_client_scripts";s:1:"B";s:15:"has_mobile_site";s:1:"B";s:17:"last_suspended_on";s:2:"DT";s:8:"bill_day";s:1:"N";s:10:"force_efax";s:1:"B";s:14:"mobile_tablets";s:1:"B";s:14:"force_metrofax";s:1:"B";s:12:"social_links";s:1:"S";s:9:"home_link";s:1:"S";s:13:"embed_origins";s:1:"S";s:14:"copyright_name";s:1:"S";s:12:"pricing_plan";s:1:"N";s:21:"google_analytics_code";s:1:"S";s:31:"google_analytics_linker_domains";s:1:"S";s:26:"google_analytics_four_code";s:1:"S";s:15:"paypal_api_data";s:1:"S";s:16:"meta_description";s:1:"S";s:13:"meta_keywords";s:1:"S";s:19:"getresponse_api_key";s:1:"S";s:25:"getresponse_campaign_name";s:1:"S";s:23:"getresponse_campaign_id";s:1:"S";s:13:"email_service";s:1:"E";s:14:"phone_priority";s:1:"S";s:12:"sms_priority";s:1:"S";s:11:"fax_service";s:1:"E";s:18:"order_sms_priority";s:1:"S";s:19:"order_sms_hide_link";s:1:"B";s:27:"order_sms_show_account_name";s:1:"B";s:12:"fax_priority";s:1:"S";s:13:"admin_version";s:1:"N";s:20:"group_orders_enabled";s:1:"B";s:19:"auto_upsell_enabled";s:1:"B";s:25:"hide_special_instructions";s:1:"B";s:29:"special_instructions_required";s:1:"B";s:28:"special_instructions_details";s:1:"S";s:17:"homepage_override";s:1:"S";s:13:"site_redirect";s:1:"S";s:20:"admin_id_menu_access";s:1:"N";s:6:"use_km";s:1:"B";s:21:"default_ordering_page";s:1:"N";s:14:"cancelled_date";s:2:"DT";s:17:"validate_callback";s:1:"B";s:17:"skip_time_warning";s:1:"B";s:7:"api_key";s:1:"S";s:17:"facebook_pixel_id";s:1:"S";s:21:"constant_contact_code";s:1:"S";s:24:"constant_contact_form_id";s:1:"S";s:38:"yelp_reservations_calendar_widget_code";s:1:"S";s:21:"default_restaurant_id";s:1:"N";s:12:"allow_delete";s:1:"B";s:31:"sms_order_notifications_enabled";s:1:"B";s:36:"sms_order_notifications_for_delivery";s:1:"B";s:34:"sms_order_notifications_for_dinein";s:1:"B";s:34:"sms_order_notifications_for_pickup";s:1:"B";s:31:"sms_order_notifications_minutes";s:1:"B";s:25:"inventory_manager_enabled";s:1:"B";s:18:"how_heard_about_us";s:1:"S";s:26:"account_status_modified_at";s:2:"DT";s:25:"location_wording_singular";s:1:"S";s:35:"hide_restaurant_closed_checkout_msg";s:1:"B";s:32:"show_created_at_on_order_monitor";s:1:"B";s:25:"display_zero_dollar_items";s:1:"B";s:23:"show_cross_street_field";s:1:"B";s:18:"announcements_html";s:1:"S";s:21:"announcements_enabled";s:1:"B";s:26:"announcements_expired_date";s:2:"DT";s:23:"receipt_signature_shown";s:1:"B";s:23:"receipt_extra_tip_shown";s:1:"B";s:19:"receipt_email_shown";s:1:"B";s:20:"new_receipt_disabled";s:1:"B";s:15:"is_receipt_bold";s:1:"B";s:17:"receipt_font_size";s:1:"N";s:19:"announcements_place";s:1:"S";s:9:"logo_size";s:1:"S";s:23:"payment_options_enabled";s:1:"B";s:16:"open_graph_image";s:1:"S";s:35:"itsacheckmate_notifications_enabled";s:1:"B";s:16:"menu_api_webhook";s:1:"S";s:12:"menu_updated";s:1:"B";s:25:"pos_notifications_enabled";s:1:"B";s:36:"payment_aggregator_messaging_enabled";s:1:"B";s:21:"payment_aggregator_id";s:1:"N";s:17:"sales_tax_enabled";s:1:"N";s:8:"tax_code";s:1:"S";s:22:"shipday_enabled_status";s:1:"N";s:35:"print_orders_without_prices_enabled";s:1:"B";s:28:"deliver_by_ourselves_enabled";s:1:"B";s:36:"third_party_optimal_delivery_enabled";s:1:"B";s:35:"third_party_services_status_enabled";s:1:"B";s:18:"payment_aggregator";s:1:"E";s:12:"auto_billing";s:1:"B";s:35:"daily_summary_detailed_fees_enabled";s:1:"B";s:32:"springroll_announcements_enabled";s:1:"B";s:31:"springroll_announcements_copied";s:1:"B";s:29:"springroll_announcements_html";s:1:"S";s:37:"springroll_announcements_expired_date";s:2:"DT";s:30:"springroll_announcements_place";s:1:"S";s:20:"adjustments_disabled";s:1:"B";s:18:"google_pay_enabled";s:1:"B";s:23:"maximum_pp_order_amount";s:1:"N";}"
    
  3. 86400
    
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
DbFields.php
        $this->table = $table;
    }
 
    public function getFields($withTypes = false):array {
        //FIXME: workaround for BaseClass objects that are not present in the database. check BaseClass::NO_TABLE
        if (!$this->table) {
            return [];
        }
        if (!$this->typesCache) { //not in the local cache, let's fetch it
            $cacheKey = "describe_{$this->table}_1"; //this "1" meant "include ID" in the old code
 
            //TODO: replace with Cache::Remember
            $this->typesCache = Cache::GetArray($cacheKey);
            if (!$this->typesCache || self::SKIP_CACHE) { //not in the cache either, let's generate it
                $this->typesCache = collect(DB::select("DESCRIBE $this->table"))
                                        ->pluck('Type', 'Field')
                                        ->transform(['DbFields','simplifyType'])
                                        ->all();
 
                Cache::SetArray($cacheKey, $this->typesCache);
            }
        }
 
        if (!$this->fieldsCache && !$withTypes) {
            $this->fieldsCache = array_keys($this->typesCache);
        }
 
        return $withTypes? $this->typesCache : $this->fieldsCache;
    }
 
    /**
     * Separates all attributes into custom and pure fields (those present on the database table).
     * @param array $values
     * @return array 0 => custom fields, 1 => pure fields
     */
    public function splitCustom(array $values) {
        $tableFields = array_flip($this->getFields());
        $customFields = array_diff_key($values, $tableFields);
        $pureFields = array_intersect_key($values, $tableFields);
 
Arguments
  1. "describe_account_1"
    
  2. array:222 [
      "primary_fax" => "S"
      "primary_phone" => "S"
      "zip" => "S"
      "state" => "S"
      "city" => "S"
      "street2" => "S"
      "street1" => "S"
      "id" => "N"
      "id_string" => "S"
      "url_tag" => "S"
      "marketing_url_tag" => "S"
      "display_name" => "S"
      "email" => "S"
      "password" => "S"
      "password_last_modified" => "DT"
      "tfa_since" => "DT"
      "tfa_secret" => "S"
      "timezone" => "N"
      "suite" => "S"
      "is_locked" => "B"
      "is_permanently_closed" => "B"
      "logo_file_name" => "S"
      "app_title" => "S"
      "app_page_title" => "S"
      "always_show_title" => "B"
      "custom_css" => "S"
      "homepage_html" => "S"
      "is_cancelled" => "B"
      "created_at" => "DT"
      "modified_at" => "DT"
      "normalized_search_terms" => "S"
      "enabled_modules" => "S"
      "default_user_full_name" => "S"
      "first_name" => "S"
      "last_name" => "S"
      "job_title" => "S"
      "menubuddies_enabled" => "B"
      "seo_description_disabled" => "B"
      "self_print_campaigns_allowed" => "B"
      "default_currency" => "S"
      "reseller_user_invoice_currency" => "S"
      "payment_processor_id" => "N"
      "payment_processor_txkey" => "S"
      "payment_processor_loginid" => "S"
      "payment_processor_public_key" => "S"
      "order_calendar_color" => "S"
      "activity_calendar_color" => "S"
      "other_calendar_color" => "S"
      "order_calendar_foreground" => "S"
      "activity_calendar_foreground" => "S"
      "other_calendar_foreground" => "S"
      "mobile_number" => "S"
      "sms_is_enabled" => "B"
      "hide_logo_in_header" => "B"
      "template_id" => "N"
      "website_template_id" => "N"
      "website_template_enabled" => "B"
      "preview_template_id" => "N"
      "custom_admin_template" => "B"
      "same_page_cart_disabled" => "B"
      "show_coupon" => "B"
      "show_search" => "B"
      "menu_link_choose_location" => "B"
      "is_all_ssl" => "B"
      "custom_fax_layout_file" => "S"
      "is_demo" => "B"
      "is_billable" => "B"
      "last_billed_on" => "DT"
      "start_billing_on" => "DT"
      "pdf_password" => "S"
      "invite_code" => "S"
      "custom_stylesheet" => "S"
      "show_student_fields" => "B"
      "reseller_user_id" => "N"
      "logo_width" => "N"
      "logo_height" => "N"
      "directory_id" => "N"
      "custom_survo_id" => "S"
      "max_calls_per_order" => "N"
      "old_ehungry_restaurant_ids" => "S"
      "previous_homepage_html" => "S"
      "order_confirmation_markup" => "S"
      "additional_custom_css" => "S"
      "individual_billing" => "B"
      "category_list_layout" => "S"
      "obscure_payment_info_on_orders" => "S"
      "is_directory_only" => "B"
      "desktop_client_password" => "S"
      "desktop_client_password_last_modified" => "DT"
      "manual_payment_captures" => "B"
      "payment_processor_test_mode" => "B"
      "affiliate_user_id" => "N"
      "show_option_choice_names" => "B"
      "tagline" => "S"
      "print_order_xml_file" => "S"
      "order_sequence_id" => "N"
      "sequence_numbers_enabled" => "B"
      "custom_ordersheet_message" => "S"
      "customer_custom_ordersheet_message" => "S"
      "account_tab_label" => "S"
      "calendar_tab_label" => "S"
      "order_tab_label" => "S"
      "hide_customer_stats" => "B"
      "show_errors_in_dialogue" => "B"
      "show_advanced_addon_params" => "B"
      "show_menus_simultaneously" => "B"
      "is_store" => "B"
      "default_menu_item_image" => "S"
      "add_customer_receipt_to_ordersheet" => "B"
      "add_new_customer_msg_to_ordersheet" => "B"
      "is_nonstandard_ordersheet" => "B"
      "permit_customer_order_deletions" => "B"
      "hide_price_names" => "B"
      "show_location_on_print_ticket" => "B"
      "custom_rightbar_info" => "S"
      "show_homepage_on_ordering_page" => "B"
      "show_price_names_only" => "B"
      "sms_send_by_secondary" => "B"
      "hidden_registration_fields" => "S"
      "allow_guest_checkout" => "B"
      "force_bill" => "B"
      "location_list_format" => "S"
      "allow_client_scripts" => "B"
      "has_mobile_site" => "B"
      "last_suspended_on" => "DT"
      "bill_day" => "N"
      "force_efax" => "B"
      "mobile_tablets" => "B"
      "force_metrofax" => "B"
      "social_links" => "S"
      "home_link" => "S"
      "embed_origins" => "S"
      "copyright_name" => "S"
      "pricing_plan" => "N"
      "google_analytics_code" => "S"
      "google_analytics_linker_domains" => "S"
      "google_analytics_four_code" => "S"
      "paypal_api_data" => "S"
      "meta_description" => "S"
      "meta_keywords" => "S"
      "getresponse_api_key" => "S"
      "getresponse_campaign_name" => "S"
      "getresponse_campaign_id" => "S"
      "email_service" => "E"
      "phone_priority" => "S"
      "sms_priority" => "S"
      "fax_service" => "E"
      "order_sms_priority" => "S"
      "order_sms_hide_link" => "B"
      "order_sms_show_account_name" => "B"
      "fax_priority" => "S"
      "admin_version" => "N"
      "group_orders_enabled" => "B"
      "auto_upsell_enabled" => "B"
      "hide_special_instructions" => "B"
      "special_instructions_required" => "B"
      "special_instructions_details" => "S"
      "homepage_override" => "S"
      "site_redirect" => "S"
      "admin_id_menu_access" => "N"
      "use_km" => "B"
      "default_ordering_page" => "N"
      "cancelled_date" => "DT"
      "validate_callback" => "B"
      "skip_time_warning" => "B"
      "api_key" => "S"
      "facebook_pixel_id" => "S"
      "constant_contact_code" => "S"
      "constant_contact_form_id" => "S"
      "yelp_reservations_calendar_widget_code" => "S"
      "default_restaurant_id" => "N"
      "allow_delete" => "B"
      "sms_order_notifications_enabled" => "B"
      "sms_order_notifications_for_delivery" => "B"
      "sms_order_notifications_for_dinein" => "B"
      "sms_order_notifications_for_pickup" => "B"
      "sms_order_notifications_minutes" => "B"
      "inventory_manager_enabled" => "B"
      "how_heard_about_us" => "S"
      "account_status_modified_at" => "DT"
      "location_wording_singular" => "S"
      "hide_restaurant_closed_checkout_msg" => "B"
      "show_created_at_on_order_monitor" => "B"
      "display_zero_dollar_items" => "B"
      "show_cross_street_field" => "B"
      "announcements_html" => "S"
      "announcements_enabled" => "B"
      "announcements_expired_date" => "DT"
      "receipt_signature_shown" => "B"
      "receipt_extra_tip_shown" => "B"
      "receipt_email_shown" => "B"
      "new_receipt_disabled" => "B"
      "is_receipt_bold" => "B"
      "receipt_font_size" => "N"
      "announcements_place" => "S"
      "logo_size" => "S"
      "payment_options_enabled" => "B"
      "open_graph_image" => "S"
      "itsacheckmate_notifications_enabled" => "B"
      "menu_api_webhook" => "S"
      "menu_updated" => "B"
      "pos_notifications_enabled" => "B"
      "payment_aggregator_messaging_enabled" => "B"
      "payment_aggregator_id" => "N"
      "sales_tax_enabled" => "N"
      "tax_code" => "S"
      "shipday_enabled_status" => "N"
      "print_orders_without_prices_enabled" => "B"
      "deliver_by_ourselves_enabled" => "B"
      "third_party_optimal_delivery_enabled" => "B"
      "third_party_services_status_enabled" => "B"
      "payment_aggregator" => "E"
      "auto_billing" => "B"
      "daily_summary_detailed_fees_enabled" => "B"
      "springroll_announcements_enabled" => "B"
      "springroll_announcements_copied" => "B"
      "springroll_announcements_html" => "S"
      "springroll_announcements_expired_date" => "DT"
      "springroll_announcements_place" => "S"
      "adjustments_disabled" => "B"
      "google_pay_enabled" => "B"
      "maximum_pp_order_amount" => "N"
    ]
    
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
BaseClass.class.php
     * Checks for either legacy or Laravel-style getters (getField() or getFieldAttribute()).
     * @param string $key
     * @return string
     */
    private function findAnyGetMutator($key):string {
        return $this->findAnyMutator('get', $key);
    }
 
    public function setAttribute($key, $value) {
        if ($key == 'key_name' && in_array($key, $this->fields()->getFields())) {
            //TODO: another special case, there's a field with the same name as the setter for the Eloquent PK at TemplateAccountSettings
            return parent::setAttribute($key, $value);
        }
 
        //first we check for the mutated setters
        if ($setter = $this->findAnySetMutator($key)) {
            return $this->$setter($value);
        }
 
        if (in_array($key, $this->fields()->getFields()) || array_key_exists($key, $this->attributes)) {
            //this is an existing database field, so let's set it as an attribute
            return parent::setAttribute($key, $value);
        } elseif (property_exists($this, $key)) {
            //support for legacy setter of custom props
            return $this->$key = $value;
        } else {
            //probably a custom prop (sometimes used in legacy code), so let's set it directly on the object as usual
            if (DevLevel > 0) {
                trigger_error('Custom property set at '.static::class.": $key", E_USER_NOTICE);
            }
            return $this->$key = $value;
        }
    }
 
    /**
     * Sets the "created_at" field, similarly to {@link HasTimestamps::setCreatedAt()}.
     *
     * We had to override this method because of the legacy setters, as follows: Eloquent is based on setXyzAttribute()
     * setters, but we also allow setXyz() for legacy reasons, and this happens at {@link setAttribute()}. When
     * {@link updateTimestamps()} is called, it calls setUpdateAt() (which works fine because our configured field is
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
BaseClass.class.php
     */
    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) {
        return new eHungry\Illuminate\Database\Eloquent\Builder($query);
    }
 
    protected static function boot() {
        parent::boot();
 
        //Registering events in a better way - https://laravel.com/docs/5.7/eloquent#events
        //Based on the Ardent implementation (https://goo.gl/ieFB59), taken from Yii/Rails models
        $eventTypes = ['sav', 'creat', 'updat', 'delet', 'restor', 'retriev'];
        $tenses = ['ing', 'ed']; //There's NO retrieving event! a check was not placed here for performance
Arguments
  1. "id"
    
  2. -1
    
/
home
/
deploy
/
EHungry-2-igor
/
PHP
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasRelationships.php
    public function getMorphClass()
    {
        $morphMap = Relation::morphMap();
 
        if (! empty($morphMap) && in_array(static::class, $morphMap)) {
            return array_search(static::class, $morphMap, true);
        }
 
        return static::class;
    }
 
    /**
     * Create a new model instance for a related model.
     *
     * @param  string  $class
     * @return mixed
     */
    protected function newRelatedInstance($class)
    {
        return tap(new $class, function ($instance) {
            if (! $instance->getConnectionName()) {
                $instance->setConnection($this->connection);
            }
        });
    }
 
    /**
     * Get all the loaded relations for the instance.
     *
     * @return array
     */
    public function getRelations()
    {
        return $this->relations;
    }
 
    /**
     * Get a specified relationship.
     *
     * @param  string  $relation
/
home
/
deploy
/
EHungry-2-igor
/
PHP
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasRelationships.php
 
    /**
     * Define an inverse one-to-one or many relationship.
     *
     * @param  string  $related
     * @param  string  $foreignKey
     * @param  string  $ownerKey
     * @param  string  $relation
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function belongsTo($related, $foreignKey = null, $ownerKey = null, $relation = null)
    {
        // If no relation name was given, we will use this debug backtrace to extract
        // the calling method's name and use that as the relationship name as most
        // of the time this will be what we desire to use for the relationships.
        if (is_null($relation)) {
            $relation = $this->guessBelongsToRelation();
        }
 
        $instance = $this->newRelatedInstance($related);
 
        // If no foreign key was supplied, we can use a backtrace to guess the proper
        // foreign key name by using the name of the relationship function, which
        // when combined with an "_id" should conventionally match the columns.
        if (is_null($foreignKey)) {
            $foreignKey = Str::snake($relation).'_'.$instance->getKeyName();
        }
 
        // Once we have the foreign key names, we'll just create a new Eloquent query
        // for the related models and returns the relationship instance which will
        // actually be responsible for retrieving and hydrating every relations.
        $ownerKey = $ownerKey ?: $instance->getKeyName();
 
        return new BelongsTo(
            $instance->newQuery(), $this, $foreignKey, $ownerKey, $relation
        );
    }
 
    /**
     * Define a polymorphic, inverse one-to-one or many relationship.
Arguments
  1. "Account"
    
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
CustomDomain.class.php
/**
 * @property int $account_id
 * @property string $domain
 * @property string $type
 * @property ?\Carbon\Carbon|string $domain_expires // domain statistics are maintained in batch by the preparereports job
 * @property int $domain_flags
 * @property \Carbon\Carbon|string $domain_checked
 * @property Account $account
 */
class CustomDomain extends BaseClass {
    const TYPE_DEFAULT = 'default';
    const TYPE_WEBSITE = 'website';
 
    protected $nullables = [
        'domain_expires',
        'domain_checked',
    ];
 
    public function account() {
        return $this->belongsTo(Account::class);
    }
 
    protected function clearCache() {
        Cache::Delete("cd_{$this->domain}");
        Cache::Delete($this->getAccountCacheKey());
    }
 
    protected function getAccountCacheKey(): string {
        return $this->isForWebsite() ? "cd_aid_website_{$this->account_id}" : "cd_aid_{$this->account_id}";
    }
 
    /** @noinspection PhpUnused */
    public function onSaved() {
        $this->account->appendEmbedOrigin($this->domain);
        $this->account->save();
        $this->clearCache();
    }
 
    /** @noinspection PhpUnused */
    public function onDeleting() {
Arguments
  1. "Account"
    
/
home
/
deploy
/
EHungry-2-igor
/
PHP
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasAttributes.php
 
        // If the "attribute" exists as a method on the model, we will just assume
        // it is a relationship and will load and return results from the query
        // and hydrate the relationship's value on the "relationships" array.
        if (method_exists($this, $key)) {
            return $this->getRelationshipFromMethod($key);
        }
    }
 
    /**
     * Get a relationship value from a method.
     *
     * @param  string  $method
     * @return mixed
     *
     * @throws \LogicException
     */
    protected function getRelationshipFromMethod($method)
    {
        $relation = $this->$method();
 
        if (! $relation instanceof Relation) {
            throw new LogicException('Relationship method must return an object of type '
                .'Illuminate\Database\Eloquent\Relations\Relation');
        }
 
        return tap($relation->getResults(), function ($results) use ($method) {
            $this->setRelation($method, $results);
        });
    }
 
    /**
     * Determine if a get mutator exists for an attribute.
     *
     * @param  string  $key
     * @return bool
     */
    public function hasGetMutator($key)
    {
        return method_exists($this, 'get'.Str::studly($key).'Attribute');
/
home
/
deploy
/
EHungry-2-igor
/
PHP
/
vendor
/
illuminate
/
database
/
Eloquent
/
Concerns
/
HasAttributes.php
    /**
     * Get a relationship.
     *
     * @param  string  $key
     * @return mixed
     */
    public function getRelationValue($key)
    {
        // If the key already exists in the relationships array, it just means the
        // relationship has already been loaded, so we'll just return it out of
        // here because there is no need to query within the relations twice.
        if ($this->relationLoaded($key)) {
            return $this->relations[$key];
        }
 
        // If the "attribute" exists as a method on the model, we will just assume
        // it is a relationship and will load and return results from the query
        // and hydrate the relationship's value on the "relationships" array.
        if (method_exists($this, $key)) {
            return $this->getRelationshipFromMethod($key);
        }
    }
 
    /**
     * Get a relationship value from a method.
     *
     * @param  string  $method
     * @return mixed
     *
     * @throws \LogicException
     */
    protected function getRelationshipFromMethod($method)
    {
        $relation = $this->$method();
 
        if (! $relation instanceof Relation) {
            throw new LogicException('Relationship method must return an object of type '
                .'Illuminate\Database\Eloquent\Relations\Relation');
        }
 
Arguments
  1. "account"
    
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
classes
/
BaseClass.class.php
    public function setUpdatedAt($value) {
        if (static::UPDATED_AT) {
            parent::setAttribute(static::UPDATED_AT, $value);
        }
        return $this;
    }
 
    public function getAttribute($key) {
        //first we check for mutated getters
        if ($getter = $this->findAnyGetMutator($key)) {
            return $this->$getter();
        }
 
        if (in_array($key, $this->fields()->getFields()) || array_key_exists($key, $this->attributes)) {
            //this is an existing database field or came from a custom query, so let's get it as an attribute
            return parent::getAttribute($key);
        } elseif ($this->relationLoaded($key) || method_exists($this, $key)) {
            //this is a relationship method, skipped at getAttribute() by the last if-clause, so let's call it here
            try {
                return $this->getRelationValue($key);
            } catch (LogicException $e) {
                throw new LogicException('You probably forgot to *return* from your relation method - or accidentally triggered a relation getter where you shouldn\'t', $e->getCode(), $e);
            }
        } elseif (property_exists($this, $key)) {
            //support for legacy getter of custom props
            return $this->$key;
        } else {
            //probably a custom prop (sometimes used in legacy code), so let's get it directly from the object as usual
            //this causes a small side-effect where isset() can't be used with undeclared custom props; property_exists() should be used instead (actually, they should be declared lol)
            if (DevLevel > 0) {
                trigger_error('Custom property got from '.static::class.": $key", E_USER_NOTICE);
            }
            return $this->$key;
        }
    }
 
    /**
     * Get the value of an attribute using its mutator. Overwritten from parent class to allow for legacy-style get
     * mutators (without the "Attribute" postfix).
     * @param  string  $key
Arguments
  1. "account"
    
/
home
/
deploy
/
EHungry-2-igor
/
PHP
/
vendor
/
illuminate
/
database
/
Eloquent
/
Model.php
     *
     * @param  int  $perPage
     * @return $this
     */
    public function setPerPage($perPage)
    {
        $this->perPage = $perPage;
 
        return $this;
    }
 
    /**
     * Dynamically retrieve attributes on the model.
     *
     * @param  string  $key
     * @return mixed
     */
    public function __get($key)
    {
        return $this->getAttribute($key);
    }
 
    /**
     * Dynamically set attributes on the model.
     *
     * @param  string  $key
     * @param  mixed  $value
     * @return void
     */
    public function __set($key, $value)
    {
        $this->setAttribute($key, $value);
    }
 
    /**
     * Determine if the given attribute exists.
     *
     * @param  mixed  $offset
     * @return bool
     */
Arguments
  1. "account"
    
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
lib
/
global.php
 
/**
 * Clears a base64 picture, encodes it back and defines extension.
 * It removes "data:" prefixes and corrects "+" as space; encodes that back to binary; and finds whether it's JPG or PNG.
 * @param string $img A base64 encoded image file
 * @return array{ 0: string, 1: ?string } 0 => base64 image file; 1 => image extension, or null if the image is invalid
 */
function base64_pic($img) {
    $img = str_replace('data:image/png;base64,', '', $img, $isPng);
    $img = str_replace('data:image/jpeg;base64,', '', $img, $isJpg);
    $img = str_replace(' ', '+', $img);
    return [base64_decode($img), $isPng? 'png' : ($isJpg? 'jpg' : null)];
}
 
//TODO: maybe move those getAccount methods into the Account class?
 
function getAccountForRequest(): ?Account {
    $customDomain = CustomDomain::getForDomain(HN_SECURE);
    if ($customDomain) {
        return $customDomain->account;
    } else {
        $id = $_REQUEST['account_id_string'] ?? $_REQUEST['aid'] ?? null;
        return $id? Account::getByAnyIdentifier($id) : null;
    }
}
 
/**
 * Finds the account ID stored in the session, giving preference to the Customer pages account.
 * @return int|null
 */
function getAccountIdFromSession(): ?int {
    return $_SESSION['customer_account_id'] ??
        $_SESSION['manager_account_id'] ??
        $_SESSION['account_id'] ??
        null;
}
 
function getAccountFromSession(): ?Account {
    if ($id = getAccountIdFromSession()) {
        return new Account($id);
Arguments
  1. "account"
    
/
home
/
deploy
/
EHungry-2-igor
/
PHP
/
Global.php
if (!$controller && isAjax()) {
    $controller = 'ajax';
}
 
//go through the rest of the controllers
if (!$controller) {
    foreach ($controllers as $k => $v) {
        if (preg_match("/^\/$k(\/|\?|#|$)/", $_SERVER['REQUEST_URI'])) {
            $controller = $v;
            break;
        }
    }
}
//must be cms or customer
if (!$controller && (!isset($customDomain) || !$customDomain) && (stristr($_SERVER['REQUEST_URI'], "/web/") || $_SERVER['REQUEST_URI'] == '/' || substr($_SERVER['REQUEST_URI'], 0, 2) == '/?')) {
    $controller = 'cms';
}
 
if (!$controller) {
    $account = getAccountForRequest();
    $websiteTemplateEnabled = $account->website_template_enabled ?? false; //unavailable on CLI scripts...
 
    if (isset($customDomain)
            && $websiteTemplateEnabled
            && $customDomain instanceof CustomDomain
            && $customDomain->isForWebsite()) {
        $controller = 'website';
    } else {
        $controller = 'customer';
    }
}
 
$_REQUEST['controller'] = $controller;
 
if ($controller != 'customer') {
    $formMap = [
        'mycreditcards' => Secure,
        'login' => Secure,
        'mypassword' => Secure,
        'billing' => Secure,
/
home
/
deploy
/
EHungry-2-igor
/
Web
/
index.php
<? /** @noinspection PhpIncludeInspection - to avoid marking dynamic includes */
 
//TODO create a «root»/_bootstrap.php which can be used by .psysh.php, tests/bootstrap.php and Web/index.php
require(dirname(__DIR__).'/PHP/base_consts.php');
require(dirname(__DIR__).'/PHP/autoloader.php');
initializeAutoLoader();
 
//disabled for now since we already have our own Alerts infrastructure, and it's not worth it to append another cloud provider to the startup of every freaking request; it's also not possible to catch errors this early if we depend on database checks, but we'll leave it here in case we change our mind?
//ErrorHandlers::sentryInit(); //early catch of errors and failsafe for smaller controllers, not in Sentry
 
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-2-igor/PHP/Global.php"
    

Environment & details:

Key Value
aid
"privacy"
empty
empty
Key Value
PHPSESSID
"jsh33mcq6vvto5uprbofjivoj5"
Key Value
loc
"en_US"
Key Value
UNIQUE_ID
"abWI93IzhIIET_MmA1YAYwAAAAU"
SCRIPT_URL
"/privacy"
SCRIPT_URI
"http://www.chuckspizzapasta.com.2.igor.ehungry.net/privacy"
HTTP_HOST
"www.chuckspizzapasta.com.2.igor.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.56"
HTTP_X_FORWARDED_FOR
"216.73.216.56"
HTTP_X_CONFKEY
"Main_Domain:1810"
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=jsh33mcq6vvto5uprbofjivoj5"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache/2.4.62 () mod_wsgi/4.7.1 Python/3.7 PHP/7.2.34"
SERVER_NAME
"www.chuckspizzapasta.com.2.igor.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-2-igor/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-2-igor/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-2-igor/Web/index.php"
REMOTE_PORT
"33366"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=privacy"
REQUEST_URI
"/privacy"
SCRIPT_NAME
"/privacy"
PHP_SELF
"/privacy"
REQUEST_TIME_FLOAT
1773504759.013
REQUEST_TIME
1773504759
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