ParseError
syntax error, unexpected '<<' (T_SL), expecting case (T_CASE) or default (T_DEFAULT) or '}' ParseError thrown with message "syntax error, unexpected '<<' (T_SL), expecting case (T_CASE) or default (T_DEFAULT) or '}'" Stacktrace: #11 ParseError in /home/deploy/EHungry-2-joel/Web/classes/Restaurant.class.php:1965 #10 Composer\Autoload\includeFile in /home/deploy/EHungry-2-joel/PHP/vendor/composer/ClassLoader.php:428 #9 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #8 spl_autoload_call in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1340 #7 Account:{closure} in /home/deploy/EHungry-2-joel/Web/classes/Cache.class.php:201 #6 Cache:RememberType in /home/deploy/EHungry-2-joel/Web/classes/Cache.class.php:242 #5 Cache:RememberArray in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1349 #4 Account:getAllRestaurantsByAccountId in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1359 #3 Account:getAllRestaurants in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1316 #2 Account:getActiveRestaurants in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:2994 #1 Account:isOnSpringroll in /home/deploy/EHungry-2-joel/Web/controllers/customer.php:263 #0 require in /home/deploy/EHungry-2-joel/Web/index.php:30
Stack frames (12)
11
ParseError
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Restaurant.class.php
1965
10
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
428
9
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
8
spl_autoload_call
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1340
7
Account
{closure}
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cache.class.php
201
6
Cache
RememberType
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cache.class.php
242
5
Cache
RememberArray
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1349
4
Account
getAllRestaurantsByAccountId
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1359
3
Account
getAllRestaurants
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1316
2
Account
getActiveRestaurants
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
2994
1
Account
isOnSpringroll
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
263
0
require
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Restaurant.class.php
                    return false;
                }
                break;
            case PAYMENT_CREDIT:
            case PAYMENT_DEBIT:
            case PAYMENT_PREPAID:
            case PAYMENT_UNKNOWN_CARD:
            case PAYMENT_APPLE_PAY:
            case PAYMENT_GOOGLE_PAY:
                if (!($this->pay_with_credit & @constant($cart->getBaseOrderType()))) {
                    return false;
                }
 
                //if mercury/vantiv and adding new card
                if ($account->getEffectivePaymentProcessorId() == PaymentProcessor\Vantiv::$processorId && $handler->params['credit~card'] == -1) {
                    return true;
                }
 
                //Google Pay (Authorize.net and CardConnect)
<<<<<<< HEAD
                if ((!empty($handler->params['googlePayToken']) || !empty($handler->params['applePayToken'])) && $account->canUseDigitalWallets()) {
=======
                if (!empty($handler->params['google~pay~token']) && $account->canUseGooglePay()) {
>>>>>>> origin/Release/PHP7
                    return true;
                }
 
                $card = new CustomerPaymentInfo($handler->params['credit~card']);
 
                //credit card must match the delivery address it was created for
                if ($cart->getBaseOrderType() == 'DELIVERY'
                    && ($card->delivery_address_id && $card->delivery_address_id != $cart->getDeliveryAddressId())
                    && ($card->delivery_address_id != -1 || $card->saved)) {
                    return false;
                }
 
                $cardTypeName = $card->getShortTypeName();
                $cart->setHouseAccountId(null);
                $cart->setCustomPaymentTypeId(null);
 
Arguments
  1. "syntax error, unexpected '<<' (T_SL), expecting case (T_CASE) or default (T_DEFAULT) or '}'"
    
/
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/Restaurant.class.php"
    
[internal]
Arguments
  1. "Restaurant"
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
 
        if (is_array($restaurants)) {
            return count($restaurants);
        }
        return 0;
    }
 
    /**
     * All restaurants for the given account which are not deleted and, optionally, not locked ($activeOnly)
     * @param int    $aid
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     * @see Restaurant::clearCacheByAccountId() so you can clean up the cache keys
     */
    public static function getAllRestaurantsByAccountId($aid, $orderBy = 'display_name', $activeOnly = false) {
        $cacheKey = "restaurants_{$aid}_{$orderBy}_".($activeOnly? 1 : 0);
 
        return Cache::RememberArray($cacheKey, function () use ($aid, $orderBy, $activeOnly) {
            $list = Restaurant::isDeleted(false)->where('account_id', $aid);
            if ($activeOnly) {
                $list->where('is_locked', false);
            }
            if (in_array($orderBy, ['position', 'id', 'display_name'])) {
                $list->orderBy($orderBy);
            }
 
            return $list->get()->all()?: null;
        }, true);
    }
 
    /**
     * All restaurants for the current account which are not deleted and, optionally, not locked ($activeOnly)
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     */
    public function getAllRestaurants($orderBy = 'display_name', $activeOnly = false) {
        return self::getAllRestaurantsByAccountId($this->id, $orderBy, $activeOnly);
    }
Arguments
  1. "Restaurant"
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cache.class.php
    }
 
    private static function RememberType($type, $allowNull, $key, callable $generator, $expire = 86400) {
        if (!static::getInstance()) {
            return false;
        }
 
        if ($type) {
            $notFound = $type == 'bool'? null : false;
            $value = static::GetType($type, $key, $allowNull, $notFound);
            if ($value !== $notFound) {
                return $value;
            }
        } else {
            if ($value = static::Get($key)) {
                return $value;
            }
        }
 
        $value = $generator();
        if (is_null($value) && !$allowNull) { //skips saving a null value if these are forbidden
            return null;
        }
        static::Set($key, $type? serialize($value) : $value, $expire);
 
        return $value;
    }
 
    /**
     * If the value for $key is not found, it's generated using $generator and then, stored for further uses.
     * @param string $key
     * @param callable $generator
     * @param int      $expire
     * @return array|bool|mixed|string
     */
    public static function Remember($key, callable $generator, $expire = 86400) {
        return static::RememberType(null, null, $key, $generator, $expire);
    }
 
    /**
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cache.class.php
     * @param string   $key
     * @param callable $generator
     * @param bool     $allowNull
     * @param int      $expire
     * @return null|bool|object
     */
    public static function RememberObject($key, callable $generator, $allowNull = false, $expire = 86400) {
        return static::RememberType('object', $allowNull, $key, $generator, $expire);
    }
 
    /**
     * If the value for $key is not found, it's generated using $generator and then, stored for further uses.
     * @param string   $key
     * @param callable $generator
     * @param bool     $allowNull
     * @param int      $expire
     * @return null|bool|array
     */
    public static function RememberArray($key, callable $generator, $allowNull = false, $expire = 86400) {
        return static::RememberType('array', $allowNull, $key, $generator, $expire);
    }
 
    /**
     * If the value for $key is not found, it's generated using $generator and then, stored for further uses.
     * @param string   $key
     * @param callable $generator
     * @param int      $expire
     * @return null|bool
     */
    public static function RememberBoolean($key, callable $generator, $expire = 86400) {
        return static::RememberType('array', false, $key, $generator, $expire);
    }
}
 
Arguments
  1. "array"
    
  2. true
    
  3. "restaurants_18552_display_name_1"
    
  4. Closure {
      class: "Account"
      use: {
        $aid: 18552
        $orderBy: "display_name"
        $activeOnly: true
      }
    }
    
  5. 86400
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
     * @param int    $aid
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     * @see Restaurant::clearCacheByAccountId() so you can clean up the cache keys
     */
    public static function getAllRestaurantsByAccountId($aid, $orderBy = 'display_name', $activeOnly = false) {
        $cacheKey = "restaurants_{$aid}_{$orderBy}_".($activeOnly? 1 : 0);
 
        return Cache::RememberArray($cacheKey, function () use ($aid, $orderBy, $activeOnly) {
            $list = Restaurant::isDeleted(false)->where('account_id', $aid);
            if ($activeOnly) {
                $list->where('is_locked', false);
            }
            if (in_array($orderBy, ['position', 'id', 'display_name'])) {
                $list->orderBy($orderBy);
            }
 
            return $list->get()->all()?: null;
        }, true);
    }
 
    /**
     * All restaurants for the current account which are not deleted and, optionally, not locked ($activeOnly)
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     */
    public function getAllRestaurants($orderBy = 'display_name', $activeOnly = false) {
        return self::getAllRestaurantsByAccountId($this->id, $orderBy, $activeOnly);
    }
 
    public static function checkIfRestaurantPhoneNumberExistsWithinAReseller($rid, $phone) {
        // We start by validating and formatting the given phone number
        $pv = new PhoneValidator($phone);
 
        // If the phone number is not valid, we return
        if ($phone == '' || !$pv->validate()) {
            return '';
        }
Arguments
  1. "restaurants_18552_display_name_1"
    
  2. Closure {
      class: "Account"
      use: {
        $aid: 18552
        $orderBy: "display_name"
        $activeOnly: true
      }
    }
    
  3. true
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
            $list = Restaurant::isDeleted(false)->where('account_id', $aid);
            if ($activeOnly) {
                $list->where('is_locked', false);
            }
            if (in_array($orderBy, ['position', 'id', 'display_name'])) {
                $list->orderBy($orderBy);
            }
 
            return $list->get()->all()?: null;
        }, true);
    }
 
    /**
     * All restaurants for the current account which are not deleted and, optionally, not locked ($activeOnly)
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     */
    public function getAllRestaurants($orderBy = 'display_name', $activeOnly = false) {
        return self::getAllRestaurantsByAccountId($this->id, $orderBy, $activeOnly);
    }
 
    public static function checkIfRestaurantPhoneNumberExistsWithinAReseller($rid, $phone) {
        // We start by validating and formatting the given phone number
        $pv = new PhoneValidator($phone);
 
        // If the phone number is not valid, we return
        if ($phone == '' || !$pv->validate()) {
            return '';
        }
 
        // Otherwise, we get the formatted number
        $formattedPhone = $pv->getPrettyNumber();
 
        $db_conn = DB::conn();
        $sql = "SELECT r.display_name FROM ".Restaurant::getTableName()." AS r INNER JOIN account AS a ON r.account_id = a.id WHERE a.reseller_user_id = ? AND TRIM(r.primary_phone) = ? LIMIT 1";
        $db_conn->bindParameter($sql, 1, $rid, "string");
        $db_conn->bindParameter($sql, 1, $formattedPhone, "string");
 
        $result = $db_conn->query($sql);
Arguments
  1. 18552
    
  2. "display_name"
    
  3. true
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
     */
    public function getPublicOrderingStatus() {
        $restaurant = $this->getDefaultRestaurant();
        if (!$restaurant) {
            return false;
        }
 
        if (!$restaurant->getPublicOrderingIsClosed()) {
            return 'ACTIVE';
        }
 
        if ($restaurant->getPublicOrderingIsClosedForever()) {
            return 'DISABLE';
        }
 
        return 'TEMP DISABLE';
    }
 
    public function getActiveRestaurants($order_by = 'display_name') {
        return $this->getAllRestaurants($order_by, true);
    }
 
    public function getRestaurantCount() {
        $restaurants = $this->getAllRestaurants('display_name', true);
 
        if (is_array($restaurants)) {
            return count($restaurants);
        }
        return 0;
    }
 
    /**
     * All restaurants for the given account which are not deleted and, optionally, not locked ($activeOnly)
     * @param int    $aid
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     * @see Restaurant::clearCacheByAccountId() so you can clean up the cache keys
     */
    public static function getAllRestaurantsByAccountId($aid, $orderBy = 'display_name', $activeOnly = false) {
Arguments
  1. "display_name"
    
  2. true
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
    public function getPaymentAggregatorMessage($type, $isSpringroll = false) {
        if ($this->payment_aggregator_messaging_enabled) {
            $config = Configuration::getDefault();
            if ($config->{"payment_aggregator_{$type}_message"}) {
                $paymentAggregatorId = isSpringroll() || $isSpringroll ? PaymentAggregator::PAYMENT_AGGREGATOR_SPRINGROLL : $this->payment_aggregator_id;
                $paymentAggregator = new PaymentAggregator($paymentAggregatorId);
                $message = str_replace('{PAYMENT_AGGREGATOR}', $paymentAggregator->descriptor, $config->{"payment_aggregator_{$type}_message"});
                $link = $paymentAggregator->url ? ('<a href="' . $paymentAggregator->url .'" target="_blank">' . $paymentAggregator->descriptor . '</a>') : $paymentAggregator->descriptor;
                return str_replace('{PAYMENT_LINK}', ($link), $message);
            }
        }
        return '';
    }
 
    public function isShipdayOn() {
        return $this->shipday_enabled_status == Account::SHIPDAY_ENABLED_STATUS_ENABLED || $this->shipday_enabled_status == Account::SHIPDAY_ENABLED_STATUS_DISABLE_REQUESTED;
    }
 
    public function isOnSpringroll() {
        foreach ($this->getActiveRestaurants() as $restaurant) {
            if ($restaurant->is_on_springroll) {
                return true;
            }
        }
        return false;
    }
 
    public function getContextualAnnouncementsEnabled() {
        return isSpringroll() ? $this->springroll_announcements_enabled : $this->announcements_enabled;
    }
 
    public function getContextualAnnouncementsPlace() {
        return isSpringroll() ? $this->springroll_announcements_place : $this->announcements_place;
    }
 
    public function getContextualAnnouncementsHtml() {
        return isSpringroll() ? $this->springroll_announcements_html : $this->announcements_html;
    }
 
    /**
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
if ($customDomain) {
    $a = new Account($customDomain->getAccountId());
    if ($a->hasPermission(WHITELABEL)) {
        //adjust query string to match what the system expects without a custom domain
        $_REQUEST["aid"] = $a->getUrlTag();
        if (strpos($_SERVER['QUERY_STRING'], "aid=".$_REQUEST["aid"]) === false) {
            parse_str($_SERVER['QUERY_STRING'], $qs);
            $qs['aid'] = $a->getUrlTag();
            $_SERVER['QUERY_STRING'] = http_build_query($qs);
        }
        $customDomainSet = true;
    }
}
 
if (!$customDomainSet) {
    $_REQUEST['aid'] = array_shift($tokens);
}
 
$account = getAccountForRequest();
if (!$account || (isSpringroll() && !$account->isOnSpringroll())) {
    http_response_code(404);
    include(App_Path.'/Web/noaccount.php');
    exit(0);
}
/**
 * Used mainly for restricting queries with {@link BaseClass::$globalAccountScope} enabled.
 * The original $_SESSION['account_id'] holds the logged in Admin's account - which should be the same in most cases,
 * but you never know if they're browsing rival restaurants... And in the customer pages, that is used to identify the
 * admin is browsing its own pages.
 * @see isLoggedAsCustomerAdmin()
 */
$_SESSION['customer_account_id'] = $account->id;
 
//if user isn't on a custom domain and they're browsing an account on a URL other than the URL Tag, redirect to the URL Tag
if (!$customDomainSet && $_REQUEST['aid'] != $account->getUrlTag()) {
    $uri = str_ireplace($_REQUEST['aid'], $account->getUrlTag(), $_SERVER['REQUEST_URI']);
    header('Location: '.$uri, true, 301);
    exit(0);
}
 
/
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/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
empty
empty
Key Value
PHPSESSID
"aqfa4uq3sna89b7h4lad5a4gg5"
Key Value
loc
"en_US"
Key Value
UNIQUE_ID
"acM696baGC_Ia6z4ChMjlgAAAAA"
SCRIPT_URL
"/restaurant/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
SCRIPT_URI
"http://www.springroll.com.2.joel.ehungry.net/restaurant/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
HTTP_HOST
"www.springroll.com.2.joel.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.187"
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=aqfa4uq3sna89b7h4lad5a4gg5"
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.187"
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
"46288"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
REQUEST_URI
"/restaurant/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
SCRIPT_NAME
"/restaurant/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
PHP_SELF
"/restaurant/newmingronkonkoma/order/main/chow-fun-or-mei-fun/47-beef-mei-fun"
REQUEST_TIME_FLOAT
1774402295.088
REQUEST_TIME
1774402295
empty
0. Whoops\Handler\PrettyPageHandler