Error
Call to a member function getId() on null Error thrown with message "Call to a member function getId() on null" Stacktrace: #1 Error in /home/deploy/EHungry-5-simon/Web/controllers/customer.php:806 #0 require in /home/deploy/EHungry-5-simon/Web/index.php:30
Stack frames (2)
1
Error
/
home
/
deploy
/
EHungry-5-simon
/
Web
/
controllers
/
customer.php
806
0
require
/
home
/
deploy
/
EHungry-5-simon
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-5-simon
/
Web
/
controllers
/
customer.php
                $cart->bags_fee_total = $numberOfBags*$selectedBagType->price;
            }
        } elseif ($_SESSION['saved_state_bag~type']) {
            $cart->setBagsType($_SESSION['saved_state_bag~type']);
        }
    }
} else {
    unset($_SESSION['menu_id']);
}
 
// load the categories for the selected menu
if (isset($restaurant) && is_object($restaurant) && isset($menu) && is_object($menu)) {
    $categories = $menu->getCategoriesForRestaurant($restaurant->getId(), true);
}
 
$popularItems = [];
if ($account->getSetting(Setting::ACCOUNT_POPULAR_PICKS_ENABLED) !== '0' && $menus) {
    $popularAdminPreview = isLoggedAsAdmin() == $account->getId();
    foreach ($menus as $aMenu) {
        $popularPicks = PopularPicks::getEnabledForRestaurantMenu($account->getId(), $restaurant->getId(), $aMenu->id);
        // "Popular Picks" count in the category menu (ie. Popular Picks "10")
        if ($popularPicks) {
            $shownItemIds = [];
            foreach ($account->getCategoryItems(new Category(-1), $aMenu, $popularAdminPreview, $restaurant, true) as $items) {
                foreach ($items as $item) {
                    $shownItemIds[$item->id] = true;
                }
            }
            $popularItems[$aMenu->id] = PopularPicks::filterShown($popularPicks->getMenuItems(), $shownItemIds);
        }
    }
}
 
if (array_key_exists($_REQUEST['form'], $pageTitles)) {
    $_REQUEST['_PAGETITLE'] = $pageTitles[$_REQUEST['form']];
} else if (!isset($_REQUEST['_PAGETITLE'])) {
    $_REQUEST['_PAGETITLE'] = ucfirst(strtolower($_REQUEST['form']));
}
if (array_key_exists($_REQUEST['form'], $pageMetaDescription)) {
    $_REQUEST['_PAGEDESCRIPTION'] = $pageMetaDescription[$_REQUEST['form']];
Arguments
  1. "Call to a member function getId() on null"
    
/
home
/
deploy
/
EHungry-5-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");
 

Environment & details:

Key Value
aid
"order/1-walnut-chinese-cranford-location-2/main-menu/shrimp"
empty
empty
empty
Key Value
loc
"en_US"
customer_account_id
32293
cart
Cart {}
Key Value
UNIQUE_ID
"apFK-P9aDWtI6GoGxgBrIAAAAAU"
SCRIPT_URL
"/order/1-walnut-chinese-cranford-location-2/main-menu/shrimp"
SCRIPT_URI
"http://www.1walnutcranford.com.5.simon.ehungry.net/order/1-walnut-chinese-cranford-location-2/main-menu/shrimp"
HTTP_HOST
"www.1walnutcranford.com.5.simon.ehungry.net"
HTTP_X_REAL_IP
"216.73.217.122"
HTTP_X_FORWARDED_FOR
"216.73.217.122"
HTTP_X_CONFKEY
"Main_Domain:5645"
HTTP_SCHEME
"https"
HTTP_EHENV
"TODO"
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"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache/2.4.68 () mod_wsgi/4.6.5 Python/3.7 PHP/7.2.34"
SERVER_NAME
"www.1walnutcranford.com.5.simon.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-5-simon/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-5-simon/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-5-simon/Web/index.php"
REMOTE_PORT
"48006"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=1walnutcranford"
REQUEST_URI
"/order/1-walnut-chinese-cranford-location-2/main-menu/shrimp"
SCRIPT_NAME
"/order/1-walnut-chinese-cranford-location-2/main-menu/shrimp"
PHP_SELF
"/order/1-walnut-chinese-cranford-location-2/main-menu/shrimp"
REQUEST_TIME_FLOAT
1787906808.944
REQUEST_TIME
1787906808
empty
0. Whoops\Handler\PrettyPageHandler