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: #10 ParseError in /home/deploy/EHungry-2-joel/Web/classes/Restaurant.class.php:1965 #9 Composer\Autoload\includeFile in /home/deploy/EHungry-2-joel/PHP/vendor/composer/ClassLoader.php:428 #8 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #7 spl_autoload_call in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1340 #6 Account:{closure} in /home/deploy/EHungry-2-joel/Web/classes/Cache.class.php:201 #5 Cache:RememberType in /home/deploy/EHungry-2-joel/Web/classes/Cache.class.php:242 #4 Cache:RememberArray in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1349 #3 Account:getAllRestaurantsByAccountId in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1359 #2 Account:getAllRestaurants in /home/deploy/EHungry-2-joel/Web/classes/Account.class.php:1320 #1 Account:getRestaurantCount in /home/deploy/EHungry-2-joel/Web/controllers/customer.php:297 #0 require in /home/deploy/EHungry-2-joel/Web/index.php:30
Stack frames (11)
10
ParseError
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Restaurant.class.php
1965
9
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
428
8
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
7
spl_autoload_call
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1340
6
Account
{closure}
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cache.class.php
201
5
Cache
RememberType
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Cache.class.php
242
4
Cache
RememberArray
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1349
3
Account
getAllRestaurantsByAccountId
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1359
2
Account
getAllRestaurants
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
1320
1
Account
getRestaurantCount
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
297
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_77657_display_name_1"
    
  4. Closure {
      class: "Account"
      use: {
        $aid: 77657
        $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_77657_display_name_1"
    
  2. Closure {
      class: "Account"
      use: {
        $aid: 77657
        $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. 77657
    
  2. "display_name"
    
  3. true
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
classes
/
Account.class.php
            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) {
        $cacheKey = "restaurants_{$aid}_{$orderBy}_".($activeOnly? 1 : 0);
 
        return Cache::RememberArray($cacheKey, function () use ($aid, $orderBy, $activeOnly) {
            $list = Restaurant::isDeleted(false)->where('account_id', $aid);
Arguments
  1. "display_name"
    
  2. true
    
/
home
/
deploy
/
EHungry-2-joel
/
Web
/
controllers
/
customer.php
if (!$customDomainSet && $_REQUEST['aid'] != $account->getUrlTag()) {
    $uri = str_ireplace($_REQUEST['aid'], $account->getUrlTag(), $_SERVER['REQUEST_URI']);
    header('Location: '.$uri, true, 301);
    exit(0);
}
 
$_REQUEST['_SINGLE_RESTAURANT'] = false;
//if this is a child group order, we can "import" the restaurant and skip location selection
if (isset($_SESSION['group_order_id'])) {
    $restaurant = GroupOrder::find($_SESSION['group_order_id'])->restaurant;
    $_REQUEST['_SINGLE_RESTAURANT'] = true;
} elseif (isset($_SESSION['restaurant_id'])) {
    $restaurant = new Restaurant($_SESSION['restaurant_id']);
    if ($account->getId() != $restaurant->getAccountId()) {
        $restaurant = null;
    }
}
 
//if no restaurant chosen, if account only has 1 location, select it
if ($account->getRestaurantCount() == 1) {
    $_REQUEST['_SINGLE_RESTAURANT'] = true;
    if (!isset($restaurant) || !is_object($restaurant)) {
        $restaurant = $account->getDefaultRestaurant();
    }
}
 
if (isset($restaurant) && $restaurant) {
    $cart = Cart::clearCurrentIfRestaurantIsDifferent($restaurant);
    $_SESSION['restaurant_id'] = $restaurant->getId();
    $menus = $restaurant->getActiveMenus();
    if (count($menus) == 1) {
        $_REQUEST['_SINGLE_MENU'] = true;
    }
}
 
$domain = null;
//must be premium plan
if ($account->hasPermission(WHITELABEL)) {
    $domain = CustomDomain::getForAccount($account->getId());
}
/
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
"order/main/house-specialties/h4-sesame-chicken"
empty
empty
empty
Key Value
loc
"en_US"
customer_account_id
77657
Key Value
UNIQUE_ID
"acNroOyz4N1neSEbD9UTewAAAAE"
SCRIPT_URL
"/order/main/house-specialties/h4-sesame-chicken"
SCRIPT_URI
"http://www.greatchinacentralfalls.com.2.joel.ehungry.net/order/main/house-specialties/h4-sesame-chicken"
HTTP_HOST
"www.greatchinacentralfalls.com.2.joel.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.187"
HTTP_X_CONFKEY
"Main_Domain:2909"
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.greatchinacentralfalls.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
"38898"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=greatchinacentralfalls"
REQUEST_URI
"/order/main/house-specialties/h4-sesame-chicken"
SCRIPT_NAME
"/order/main/house-specialties/h4-sesame-chicken"
PHP_SELF
"/order/main/house-specialties/h4-sesame-chicken"
REQUEST_TIME_FLOAT
1774414752.929
REQUEST_TIME
1774414752
empty
0. Whoops\Handler\PrettyPageHandler