Error
Call to a member function first() on null Error thrown with message "Call to a member function first() on null" Stacktrace: #1 Error in /home/deploy/EHungry-2-joel/Web/controllers/customer.php:619 #0 require in /home/deploy/EHungry-2-joel/Web/index.php:30
Stack frames (2)
1
Error
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
619
0
require
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
}
 
if (isset($_SESSION['_CORDOVA_APP']) && $_SESSION['_CORDOVA_APP'] && strstr($account->getEnabledModules(), (string)APP_MODULE)) {
    $_REQUEST['_CORDOVA_APP'] = true;
}
 
$template_id = isset($_REQUEST['_CORDOVA_APP']) && $_REQUEST['_CORDOVA_APP']? Template::DEFAULT_ID : ($account->template_id?: Template::DEFAULT_ID);
$template = new Template($template_id);
$version = $template->version ?: 3;
if (!apache_note('AppVersion')) {
    apache_note('AppVersion', $version);
}
 
$templateName = $template->getFolderName();
$_REQUEST['_VERSION'] = $version;
$showCart = false;
 
$_REQUEST['_TEMPLATE_SETTINGS'] = TemplateAccountSetting::getAllForAccountAndTemplate($account->getId(), $template->getId());
$currentOrderingPlatform = OrderTemplatePlatforms::currentOrderingPlatform(isSpringroll());
$activeCampaign = $account->activeCampaigns($currentOrderingPlatform)->first();
if ($activeCampaign && $activeCampaign->url_tag && $_REQUEST["form"] == $activeCampaign->url_tag) {
    $_REQUEST["form"] = "campaign";
}
 
$status = isValidPage($_REQUEST["form"]);
 
//v4 pages that can can be accessed without logging in
if ($_REQUEST['_VERSION'] == 4) {
    define('IS_EDIT', isset($_SESSION['edit_order_id']) && is_numeric($_SESSION['edit_order_id']));
 
    switch ($_REQUEST['form']) {
        case 'checkout':
        case 'mycoupons':
        case 'orderconfirmation':
        case 'validatecallback':
        case 'redirect':
        case 'mercurycomplete':
        case 'paypalcomplete':
            $status = 1;
            break;
Arguments
  1. "Call to a member function first() on null"
    
/
home
/
deploy
/
EHungry-2-joel
/
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
"restaurant/lunghingkitchen/order/main/seafood"
empty
empty
empty
Key Value
loc
"en_US"
customer_account_id
51189
cart
Cart {}
restaurant_id
15058
menu_id
18152
Key Value
UNIQUE_ID
"aWWatJiYcBtNqFoX0uEbEQAAAAk"
SCRIPT_URL
"/restaurant/lunghingkitchen/order/main/seafood"
SCRIPT_URI
"http://www.springroll.com.2.joel.ehungry.net/restaurant/lunghingkitchen/order/main/seafood"
HTTP_HOST
"www.springroll.com.2.joel.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.9"
HTTP_X_CONFKEY
"Main_Domain:14844"
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"
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.2.joel.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"216.73.216.9"
DOCUMENT_ROOT
"/home/deploy/EHungry-2-joel/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-2-joel/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-2-joel/Web/index.php"
REMOTE_PORT
"59104"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/lunghingkitchen/order/main/seafood"
REQUEST_URI
"/restaurant/lunghingkitchen/order/main/seafood"
SCRIPT_NAME
"/restaurant/lunghingkitchen/order/main/seafood"
PHP_SELF
"/restaurant/lunghingkitchen/order/main/seafood"
REQUEST_TIME_FLOAT
1768266420.255
REQUEST_TIME
1768266420
empty
0. Whoops\Handler\PrettyPageHandler