Skip to content
THIS IS DEV LEVEL 2
 

China One - Nashville

2420 Lebanon Pike #2413 Nashville, TN 37214

Whoops! There was an error.
ParseError
syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST) ParseError thrown with message "syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST)" Stacktrace: #7 ParseError in /home/deploy/EHungry-2-joel/Web/classes/CustomerOrder.class.php:4106 #6 Composer\Autoload\includeFile in /home/deploy/EHungry-2-joel/PHP/vendor/composer/ClassLoader.php:428 #5 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #4 spl_autoload_call in /home/deploy/EHungry-2-joel/Web/classes/Cart.class.php:933 #3 Cart:getNextOpenTimeForAnyType in /home/deploy/EHungry-2-joel/Web/eds/ordering/restaurant.php:106 #2 EDS\Restaurant:openStatus in /home/deploy/EHungry-2-joel/Web/templates4.0/customer/header.php:510 #1 include_once in /home/deploy/EHungry-2-joel/Web/controllers/customer.php:870 #0 require in /home/deploy/EHungry-2-joel/Web/index.php:30
Stack frames (8)
7
ParseError
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
CustomerOrder.class.php
4106
6
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
428
5
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
4
spl_autoload_call
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cart.class.php
933
3
Cart
getNextOpenTimeForAnyType
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
eds
/
ordering
/
restaurant.php
106
2
EDS
\
Restaurant
openStatus
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
templates4.0
/
customer
/
header.php
510
1
include_once
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
870
0
require
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
CustomerOrder.class.php
 
    public static function getPreviousOrdersForRestaurant($customer_id, int $restaurant_id, $limit = 4) {
        $query = self::getPreviousOrdersQuery($customer_id);
        $query->where('restaurant_id', $restaurant_id);
 
        return $query->limit($limit)->get()->all();
    }
 
    private static function getPreviousOrdersQuery(int $customer_id) {
        $query = self::where('customer_id', $customer_id);
        $query->where('server_ready_at', '<=', DB::raw('NOW()'));
        if (isSpringroll()) {
            $query->where('is_on_springroll', true);
        }
        $query->orderBy('created_at', 'desc');
 
        return $query;
    }
 
<<<<<<< HEAD
    //TODO: can we place this inside a getDeliveryDistance() instead? would the hidden update cause any trouble?
    public function calculateDeliveryDistance() {
        if ($this->getShouldHaveDeliveryAddress()) {
            if ($this->delivery_distance) {
                return $this->delivery_distance;
            }
 
            $distanceAddress = $this->getAddressObject()->getGeocoderAddress();
            $geocoords = $this->getDeliveryCoordinates();
 
            if ($geocoords) {
                $restaurant = $this->restaurant;
                $distance = ZipCode::getDistanceBetweenPoints($geocoords[0], $geocoords[1], $restaurant->latitude, $restaurant->longitude, $restaurant->id, $this->account->use_km, $distanceAddress);
                if ($distance ===  false || $distance === '' || $distance === null) {
                    return 'Unknown';
                } else {
                    $this->update(['delivery_distance' => $distance]);
                    return $distance;
                }
            } else {
Arguments
  1. "syntax error, unexpected '<<' (T_SL), expecting function (T_FUNCTION) or const (T_CONST)"
    
/
home
/
deploy
/
EHungry-2-joel
/
PHP
/
vendor
/
composer
/
ClassLoader.php
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));
 
        if (null !== $this->vendorDir) {
            unset(self::$registeredLoaders[$this->vendorDir]);
        }
    }
 
    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return true|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);
 
            return true;
        }
 
        return null;
    }
 
    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
Arguments
  1. "/home/deploy/EHungry-2-joel/PHP/vendor/composer/../../../Web/classes/CustomerOrder.class.php"
    
[internal]
Arguments
  1. "CustomerOrder"
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cart.class.php
                $counter++;
            }
            return $selectedTime;
        };
 
        //going forward by each hour, check for an open time
        $selectedTime = $findOpenTime($selectedTime, '+60 Minute', $limit);
 
        //opened sometime in last hour. If open 30 minutes ago, check the 30 before that, otherwise check last 30 minutes
        $thrityAgo = strtotime('-30 Minute', $selectedTime);
        if (!$this->getIsClosedAtTime($restaurant, $thrityAgo, $menu, false, $ignoreMenuTime)) {
            $thrityAgo = strtotime('-60 Minute', $selectedTime);
        }
        return $findOpenTime($thrityAgo, '+1 Minute', 30);
    }
 
    public function getNextOpenTimeForAnyType($restaurant, $time = false) {
        $tmpOt = $this->getBaseOrderType();
        $nextOpenTime = null;
        foreach (CustomerOrder::TYPES_CAMEL as $type => $typeCamel) {
            if ($restaurant->{'getHas' . $typeCamel . 'Base'}()) {
                $this->setBaseOrderType($type);
                $newNextOpenTime = $this->getNextOpenTime($restaurant, $time ?: $restaurant->getLocalTime(), true, true);
                $nextOpenTime = !$nextOpenTime || $newNextOpenTime < $nextOpenTime ? $newNextOpenTime : $nextOpenTime;
            }
        }
        $this->setBaseOrderType($tmpOt);
        return $nextOpenTime;
    }
 
    public function getNextOpenTimeForType($restaurant, $type, $time = false) {
        $tmpOt = $this->getBaseOrderType();
        $this->setBaseOrderType($type);
        $nextOpenTime = $this->getNextOpenTime($restaurant, $time ?: $restaurant->getLocalTime(), true, true);
        $this->setBaseOrderType($tmpOt);
        return $nextOpenTime;
    }
 
    /*public function isItemInOrder($mid = NULL) {
        if(!$mid) return false;
Arguments
  1. "CustomerOrder"
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
eds
/
ordering
/
restaurant.php
            $nextOpenTime = \Cache::Get($closedUntilKey);
        } else {
            $isOrderingClosed = isOrderingClosed(CLOSED_MSG_RESTAURANT);
            $orderingClosedUntil = isOrderingClosed(CLOSED_MSG_RESTAURANT, true);
            $orderingClosedUntilTimestamp = is_numeric($orderingClosedUntil)? $orderingClosedUntil : false;
            $isOpen = !$isOrderingClosed && ($restaurant->pickupAvailableNow() || $restaurant->deliveryAvailableNow());
            if ($restaurant->getPublicOrderingClosedUntil()) {
                $hasAvailableDays =
                    $restaurant->hasAvailableDays($restaurant->getLocalTime(), $cart->getBaseOrderType());
                if ($hasAvailableDays) {
                    $nextOpenTime = $cart->getNextOpenTimeForAnyType($restaurant, $orderingClosedUntilTimestamp);
                    if (date('giA', $nextOpenTime) > date('giA', $earliestOpen)) {
                        $earliestOpen = $nextOpenTime;
                    }
                } else {
                    $orderingClosedUntil = 'Indefinitely';
                    $nextOpenTime = strtotime('+100 years');
                }
            } else {
                $nextOpenTime = $cart->getNextOpenTimeForAnyType($restaurant, $orderingClosedUntilTimestamp);
            }
            $opensSoon =
                !$isOpen && $orderingClosedUntil !== 'Indefinitely' && date('Y-m-d', $nextOpenTime) == date('Y-m-d', $restaurant->getLocalTime());
 
            if ($isOpen) {
                $closeTimestamp = $restaurant->getLatestEffectiveCloseTime($restaurant->getLocalTime());
                \Cache::Set($openUntilKey, $closeTimestamp);
            } elseif ($opensSoon) {
                \Cache::Set($opensSoonKey, $nextOpenTime);
                \Cache::Set($orderingClosedUntilKey, $orderingClosedUntil);
            } else {
                \Cache::Set($closedUntilKey, $nextOpenTime);
                \Cache::Set($orderingClosedUntilKey, $orderingClosedUntil);
            }
        }
 
        ob_start();
 
        echo Label(
            array_merge(
Arguments
  1. Restaurant {}
    
  2. false
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
templates4.0
/
customer
/
header.php
                        <div class="<?=$_REQUEST['form'] == 'home' ? 'home_hero' : 'menu_hero'?> backbgbox position-relative" role="img" aria-label="Image of food offered at the restaurant">
                            <? include(CORE_PATH. 'templates4.0/customer/logo.php'); ?>
                        </div>
 
                        <? // Restaurant open status & phone
                        if (is_object($restaurant)) { ?>
                            <div class="p-3">
                                <div class="pb-1">
                                    <h1 role="heading" aria-level="2" class="eds-display-text-title-s m-0 p-0"><?=$restaurant->getDisplayName()?></h1>
                                    <? if (isSpringroll()) { ?>
                                        <p class="eds-copy-text-m-regular m-0">
                                            <?=$restaurant->getFullAddress(false)?>
                                        </p>
                                    <? } ?>
                                </div>
 
                                <div class="d-sm-flex align-items-baseline">
                                    <? if (!is_object($_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']) || !$_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign'] || !$_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']->getValue()) { ?>
                                        <div class="mt-2">
                                            <?=\EDS\Restaurant::openStatus([], $cart, $restaurant, !isSpringroll(), true, isSpringroll())?>
                                        </div>
                                    <? } ?>
 
                                    <div class="d-flex gap-2 ms-sm-auto mt-2">
                                        <? if (!is_object($_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']) || !$_REQUEST['_TEMPLATE_SETTINGS']['hide_open_sign']->getValue()) { ?>
                                            <?=\EDS\Restaurant::storeInfo(['class' => 'col text-nowrap'], 'Store info', $restaurant)?>
                                        <? } ?>
 
                                        <? if (!isSpringroll() && $account && isCMO($account)) { ?>
                                            <?=\EDS\Restaurant::phone(['class' => 'col d-lg-none text-nowrap'], 'Call us', $restaurant)?>
                                        <? } ?>
 
                                        <? if (\RAHCampaign::isActiveForRestaurant($restaurant)) { ?>
                                            <?=\RAHCampaign::badge(true)?>
                                        <? } ?>
                                    </div>
                                </div>
                            </div>
                        <? } ?>
                    </section>
Arguments
  1. []
    
  2. Cart {}
    
  3. Restaurant {}
    
  4. false
    
  5. true
    
  6. true
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
}
 
if (!isset($cart) || !is_object($cart)) {
    $GLOBALS['cart'] = \Cart::getCurrent();
}
 
//unset callback data in the event someone didn't hit the callback validation page
if (!in_array($_REQUEST['form'], ['checkout', 'nosuchpage', 'validatecallback', 'viewdeliveryzone'])) {
    //TODO: probably need to add one more form here that is called ajax, callback seems to reset when it shouldnt
    unset($_SESSION['validation_data']);
}
 
$locs = $account->getActiveRestaurants('position');
$tab = MainNavigationTab::getAllForAccount($account->getId());
 
include_once(CORE_PATH.'lib/helpers/customer3.0.php');
 
if (!in_array($_REQUEST['form'], $viewContentOnly)) {
    App::debugbarTime('header');
    include_once(getLayoutPartPath('header'));
    App::debugbarTime('header');
}
 
App::debugbarTime("view '{$_REQUEST['form']}'");
$path = CORE_PATH.'view' . ($_REQUEST['_VERSION'] == 4 ? 4 : 3) . '.0/customer/'.$_REQUEST['form'].'.php';
if (is_readable($path)) {
    include_once($path);
}
App::debugbarTime("view '{$_REQUEST['form']}'");
 
if (!in_array($_REQUEST['form'], $viewContentOnly)) {
    App::debugbarTime('footer');
    include_once(getLayoutPartPath('footer'));
    App::debugbarTime('footer');
}
 
function getLayoutPartPath($part) {
    if (isset($_REQUEST['_CORDOVA_APP']) && $_REQUEST['_VERSION'] != 4) {
        $cart = Cart::getCurrent();
 
Arguments
  1. "/home/deploy/EHungry-2-joel/Web/templates4.0/customer/header.php"
    
/
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");
 
Arguments
  1. "/home/deploy/EHungry-2-joel/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
empty
empty
Key Value
PHPSESSID
"l8sdf21h7ccm0bkk7p5sfrhatg"
Key Value
loc
"en_US"
customer_account_id
47431
cart
Cart {}
restaurant_id
13842
menu_id
16834
Key Value
UNIQUE_ID
"aZdzbiBjC4eKJJ8MXZ3wcgAAAAo"
SCRIPT_URL
"/restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
SCRIPT_URI
"http://www.springroll.com.2.joel.ehungry.net/restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
HTTP_HOST
"www.springroll.com.2.joel.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.87"
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"
HTTP_COOKIE
"PHPSESSID=l8sdf21h7ccm0bkk7p5sfrhatg"
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.87"
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
"44088"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
REQUEST_URI
"/restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
SCRIPT_NAME
"/restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
PHP_SELF
"/restaurant/china1nashville/order/main/sushi-sashimi/r17-eel-avocado-roll"
REQUEST_TIME_FLOAT
1771533166.243
REQUEST_TIME
1771533166
empty
0. Whoops\Handler\PrettyPageHandler