Skip to content
THIS IS DEV LEVEL 9
Grand Harmony - Utica

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Your order
Whoops! There was an error.
Error
Class 'TimeRange' not found Error thrown with message "Class 'TimeRange' not found" Stacktrace: #8 Error in /home/deploy/EHungry-9-simon/Web/classes/Restaurant.class.php:2384 #7 Restaurant:getAvailableTimes in /home/deploy/EHungry-9-simon/Web/classes/Restaurant.class.php:2620 #6 Restaurant:getAvailableDates in /home/deploy/EHungry-9-simon/Web/classes/Restaurant.class.php:2659 #5 Restaurant:getOrderingDaysForAnyType in /home/deploy/EHungry-9-simon/Web/classes/Restaurant.class.php:2645 #4 Restaurant:hasOrderingDaysForAnyType in /home/deploy/EHungry-9-simon/Web/lib/global.php:1082 #3 isOrderingClosed in /home/deploy/EHungry-9-simon/Web/templates3.0/customer/mycart.php:16 #2 include in /home/deploy/EHungry-9-simon/Web/templates3.0/customer/header.php:647 #1 include_once in /home/deploy/EHungry-9-simon/Web/controllers/customer.php:886 #0 require in /home/deploy/EHungry-9-simon/Web/index.php:30
Stack frames (9)
8
Error
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
2384
7
Restaurant
getAvailableTimes
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
2620
6
Restaurant
getAvailableDates
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
2659
5
Restaurant
getOrderingDaysForAnyType
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
2645
4
Restaurant
hasOrderingDaysForAnyType
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
lib
/
global.php
1082
3
isOrderingClosed
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
templates3.0
/
customer
/
mycart.php
16
2
include
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
templates3.0
/
customer
/
header.php
647
1
include_once
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
controllers
/
customer.php
886
0
require
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
                }
            }
        }

        //menu available times
        $prevDayMenusClose = null;
        $allPrevDayMenuClosed = true;
        $onePrevDayMenuClosed = false;
        $getTimesForAnyMenus = false;
        if ($menus === null) {
            $menus = $cart->getMenus();
        }
        if (!count($menus)) {
            $menus = $this->getActiveMenus(true);
            $getTimesForAnyMenus = true;
        }
        $menusTimeRange = null;
        foreach ($menus as $menu) { /** @var Menu $menu */
            $hasMenuHoursFromPreviousDay = false;
            $menuTimeRange = new TimeRange();
            if ($menu->getAlwaysAvailable()) {
                //TODO: shouldnt those 2 lines be  in if ($end < $start) { }  ? - test a always avail with No early restaurant hours
                $prevDayMenusClose = $prevDayClose;
                $hasMenuHoursFromPreviousDay = true;
            } else {
                if ($menu->getUseAdvancedAvailability()) {
                    $day = date('l', $dateTimestamp);
                    $start = ($menu->{"get".$day."Open"}());
                    $end = ($menu->{"get".$day."Closed"}());
                    $menuTimeRange->setClosed($menu->{"getClosedOn".$day}());

                    //the following code and also a bit further down with variables $prevMenu{X} is to enable or disable the
                    //early hours in the morning based on the late night hours of the previous day's menus (ie. 10pm to 3am)
                    $prevMenuDay = date('l', strtotime('-1 day', $dateTimestamp));
                    $prevMenuDayOpen = date('H:i', strtotime($menu->{"get".$prevMenuDay."Open"}()));
                    $prevMenuDayClose = date('H:i', strtotime($menu->{"get".$prevMenuDay."Closed"}()));
                    $prevMenuDayClosed = $menu->{"getClosedOn".$prevMenuDay}();
                    $prevMenuDayClosed |= !$menu->isActivatedOn(strtotime('-1 day', $dateTimestamp));

                    if (!$prevMenuDayClosed) {
Arguments
  1. "Class 'TimeRange' not found"
    
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
            //disable days for when the cart items' category is closed
            $categories = $cart->getCartItemsCategories();
            foreach ($categories as $category) {
                $isCategoryHidden = ClosedHours::isCategoryDisabled($this, $category, $currentLocalTime, false, $orderType) || HolidayHours::isCategoryDisabled($this, $category, $currentLocalTime, false, $orderType);
                if ($isCategoryHidden) {
                    $closed = true;
                }
            }

            //ordering closed
            $closedUntil = $this->getLocalPublicOrderingClosedUntilText(true, $orderType);
            if ($closedUntil && strtotime(date('Y-m-d', $closedUntil)) > strtotime(date('Y-m-d', $currentLocalTime))) {
                $closed = true;
            }

            $dateCurrent = date('Y-m-d', $currentLocalTime);
            if (!$closed) {
                //if no times are available on that day - show whole day as unavailable
                $times = $this->getAvailableTimes(new DateTime($dateCurrent), false, $excludeClosedHours, $menus, $ignoreOrderingDaysLimit);
                if (count($times)) {
                    $ymd = date('Y-m-d', $currentLocalTime);
                    if ($returnAsKeys) {
                        $availableDates[$ymd] = $ymd;
                    } else {
                        $availableDates[] = $ymd;
                    }
                }
            }
        }

        $cart->setBaseOrderType($savedOrderType);
        $cart->updateToSession();

        return $availableDates;
    }

    public function hasAvailableDays($selectedTime, $orderType) {
        $dateTime = new DateTime(date('Y-m-d', $selectedTime));
        $availableDates = $this->getAvailableDates($dateTime, $orderType, true, true, false, []);
Arguments
  1. DateTime @1750748400 {
      date: 2025-06-24 00:00:00.0 America/Los_Angeles (-07:00)
    }
    
  2. false
    
  3. false
    
  4. array:1 [
      0 => Menu {}
    ]
    
  5. false
    
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
        $availableDates = $this->getAvailableDates($dateTime, $orderType, true, true, false, []);
        return count($availableDates) > 0;
    }

    public function hasOrderingDaysForAnyType() {
        return count($this->getOrderingDaysForAnyType()) > 0;
    }

    /**
     * @param bool $ignoreDaysLimit
     * @param Menu[] $menus
     * @return array
     * @throws Exception
     */
    public function getOrderingDaysForAnyType($ignoreDaysLimit = false, $menus = []) {
        $orderTypes = $this->getEnabledBaseOrderTypes();
        $availableDates = [];
        $dateTime = new DateTime(date('Y-m-d', $this->getLocalTime()));
        if (isset($orderTypes["PICKUP"]) || isset($orderTypes["DINEIN"])) {
            $availableDates = $this->getAvailableDates($dateTime, 'PICKUP', false, $ignoreDaysLimit, false, $menus);
        }
        if (isset($orderTypes["DELIVERY"])) {
            $availableDates = array_merge($availableDates, $this->getAvailableDates($dateTime, 'DELIVERY', false, $ignoreDaysLimit, false, $menus));
        }
        sort($availableDates);
        return $availableDates;
    }

    /**
     * @param DateTime $date
     * @return array
     */
    public function getAvailableTimeSlots($date) {
        //time slots
        if ($this->time_slots_enabled) {
            $validTimes = $this->getAvailableTimes($date);
            $timeSlots = RestaurantTimeSlot::getForRestaurant($this);
            $validTimeSlots = [];

            //filter out time slots where the max number of orders has been placed already
Arguments
  1. DateTime @1750748400 {
      date: 2025-06-24 00:00:00.0 America/Los_Angeles (-07:00)
    }
    
  2. "PICKUP"
    
  3. false
    
  4. false
    
  5. false
    
  6. []
    
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
classes
/
Restaurant.class.php
                        $availableDates[] = $ymd;
                    }
                }
            }
        }

        $cart->setBaseOrderType($savedOrderType);
        $cart->updateToSession();

        return $availableDates;
    }

    public function hasAvailableDays($selectedTime, $orderType) {
        $dateTime = new DateTime(date('Y-m-d', $selectedTime));
        $availableDates = $this->getAvailableDates($dateTime, $orderType, true, true, false, []);
        return count($availableDates) > 0;
    }

    public function hasOrderingDaysForAnyType() {
        return count($this->getOrderingDaysForAnyType()) > 0;
    }

    /**
     * @param bool $ignoreDaysLimit
     * @param Menu[] $menus
     * @return array
     * @throws Exception
     */
    public function getOrderingDaysForAnyType($ignoreDaysLimit = false, $menus = []) {
        $orderTypes = $this->getEnabledBaseOrderTypes();
        $availableDates = [];
        $dateTime = new DateTime(date('Y-m-d', $this->getLocalTime()));
        if (isset($orderTypes["PICKUP"]) || isset($orderTypes["DINEIN"])) {
            $availableDates = $this->getAvailableDates($dateTime, 'PICKUP', false, $ignoreDaysLimit, false, $menus);
        }
        if (isset($orderTypes["DELIVERY"])) {
            $availableDates = array_merge($availableDates, $this->getAvailableDates($dateTime, 'DELIVERY', false, $ignoreDaysLimit, false, $menus));
        }
        sort($availableDates);
        return $availableDates;
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
lib
/
global.php
            if ($restaurant->getPublicOrderingIsClosedForever()) {
                return $returnClosedUntilTime ? 'Indefinitely' : 'Online ordering is not currently offered at this location.';
            }
 
            if ($restaurant->public_ordering_closed_until) {
                return $restaurant->getLocalPublicOrderingClosedUntilText($returnClosedUntilTime);
            }
        }
        if (is_string($defaultMsg)) {
            return $returnClosedUntilTime ? 'Indefinitely' : $defaultMsg;
        }
 
        return $returnClosedUntilTime ? 'Indefinitely' : ($result?: true); //in case result is an empty string
    }
 
    if ($skipLoginCheck && is_object($restaurant) && $restaurant->isOrderingClosed()) {
        return true;
    }
 
    if (is_object($restaurant) && !$restaurant->hasOrderingDaysForAnyType()) {
        $cart = Cart::getCurrent();
        $nextOpenTime = $cart->getNextOpenTimeForAnyType($restaurant);
        return 'Online ordering is closed until ' . date('F jS \a\t g:iA', $nextOpenTime);
    }
 
    return false;
}
 
function addErrorDialogueToLoadEvent() {
    if (!isset($_REQUEST['hide_error_dialog'])) {
        $errStr = str_replace("'", "&lsquo;", $_REQUEST['errors']);
        $errStr = preg_replace('/\r\n/', ' ', $errStr);
        if ($errStr) {
            return '<script type="text/javascript" defer="defer">
            var tmpOnload = window.onload;
            window.onload = function() {
                if(tmpOnload) tmpOnload();
                selectBox=new jt_DialogBox(true); 
                selectBox.setWidth(550);
                selectBox.setTitle(\'Important!\'); 
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
templates3.0
/
customer
/
mycart.php
<input type="hidden" id="last-cart-action" value="<?=$_GET['cartaction'] ?? ''?>" />
 
<? function no_items($msg) { // phpcs:ignore ?>
    <div class="inner">
        <div class="item">
            <span class="noitems"><?=$msg?></span>
        </div>
    </div>
<? }
 
if (isset($errMsg)) {
    no_items($errMsg);
}
 
if ($closed_msg =
    isOrderingClosed(CLOSED_MSG_RESTAURANT) ?:
    (isset($restaurant)? $restaurant->generateHasNoOrderingMsg() : false) //TODO PHP8 nullsafe call
) {
    $cart->clear();
    no_items($closed_msg);
} else {
    $cartItemCount = $cart->getCartItemCount();
    if ($cartItemCount) {
        $cartItems = $cart->getCartItems();
?>
        <div class="inner">
<?
        foreach ($cartItems as $key => $i) {
            $cart_counter++;
            $price = $i->getSelectedPrice();
?>
            <div class="item">
                <div class="itemTop">
                    <div class="l">
                        <strong class="h4"><?=$i->getDisplayName()?></strong>
                        <p class="description">
                            <?=intToMoneyString((int)$i->getTotalPriceValue()) . " ea. ".(trim($price->getDisplayName())!=trim($i->getDisplayName())?("(".$price->getDisplayName().")"):"")?>
                        </p>
                    </div>
                    <div class="m">
Arguments
  1. "RESTAURANT"
    
/
home
/
deploy
/
EHungry-9-simon
/
Web
/
templates3.0
/
customer
/
header.php
                        include(CORE_PATH . "templates3.0/customer/widgets/footersmallnav.php");
                    } ?>
                    <hr>
                    <div class="recaptcha-terms">This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/terms">Terms of Service</a> apply.</div>
                </div>
            </div>
        </div>
 
        <div class="cart isClosed" id="cart">
            <div class="cartHeaderWrapper">
                <div class="p16" id="cartTriggerClose">
                    <i class="far fa-times fa-lg" role="presentation"></i>
                </div>
                <header>
                    <strong class="h3">Your order</strong>
                </header>
            </div>
            <div class="cartInner">
                <div class="cartInnerScroll">
                    <? include(CORE_PATH."templates3.0/customer/mycart.php"); ?>
                </div>
            </div>
        </div>
        <header class="header" style="<?=$account->logo_size == "vertical" ? "min-height:130px; " : ""?>">
            <div class="inner">
                <div class="logoContainer">
                    <? if (!isset($_REQUEST['_TEMPLATE_SETTINGS']['show_logo']) || $_REQUEST['_TEMPLATE_SETTINGS']['show_logo']->getValue() == 1) {?>
                        <a id="top-logo" href="<?=($account->getHomeLink())?$account->getHomeLink():formatCustomerLink('home')?>" class="logo" aria-hidden="true" tabindex="-1"><?
                            $noLogo = true;
                            if ($account->getLogoFileName()) {
                                $alt = MainNavigationTab::getTabName($account->id, 'home', 'Home');
                                $logoStyles = $account->getLogoSize() == "vertical" ? "height:250px; margin: 0 !important;" : "margin: 0 !important;";
                                if (strpos($account->getLogoFileName(), '_1x') !== false) {
                                    $noLogo = false;
                                    echo '<img src="' . $account->getUrl('logoFileName') .'" srcset="' . $account->getUrl('logoFileName') . ' 1x, ' . $account->getResponsiveUrl('logoFileName', '2x') . ' 2x" alt="'.$alt.'" style="'.$logoStyles.'">';
                                } else {
                                    $noLogo = false;
                                    echo '<img src="'.$account->getUrl('logoFileName').'" alt="'.$alt.'" style="'.$logoStyles.'" />';
                                }
                            }
Arguments
  1. "/home/deploy/EHungry-9-simon/Web/templates3.0/customer/mycart.php"
    
/
home
/
deploy
/
EHungry-9-simon
/
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'])) {
        $cart = Cart::getCurrent();
 
Arguments
  1. "/home/deploy/EHungry-9-simon/Web/templates3.0/customer/header.php"
    
/
home
/
deploy
/
EHungry-9-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");
 
Arguments
  1. "/home/deploy/EHungry-9-simon/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/grandharmonyutica/order"
empty
empty
Key Value
PHPSESSID
"87iconemlk7ld7clcqdvrncgsn"
Key Value
loc
"en_US"
cart
Cart {}
customer_account_id
25205
restaurant_id
7468
status
array:2 [
  1 => []
  2 => array:2 [
    0 => "We are sorry, but it appears that the account you are seeking does not currently have any menus available online. This account may be offline only temporarily, so please be sure to check again soon. If this problem persists, you may wish to contact Grand Harmony - Utica directly by calling (315) 733-6688 ."
    1 => "You must select a valid menu."
  ]
]
app_banner_shown
true
Key Value
UNIQUE_ID
"aFqqXKP9KuDt4OMsRsD25AAAAAg"
SCRIPT_URL
"/restaurant/grandharmonyutica/order"
SCRIPT_URI
"http://www.springroll.com.9.simon.ehungry.net/restaurant/grandharmonyutica/order"
HTTP_HOST
"www.springroll.com.9.simon.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.61"
HTTP_X_FORWARDED_FOR
"216.73.216.61"
HTTP_X_CONFKEY
"Main_Domain:6462"
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_REFERER
"https://www.springroll.com.9.simon.ehungry.net/restaurant/grandharmonyutica/order/grand-harmony-utica"
HTTP_COOKIE
"PHPSESSID=87iconemlk7ld7clcqdvrncgsn"
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.9.simon.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-9-simon/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-9-simon/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-9-simon/Web/index.php"
REMOTE_PORT
"51896"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/grandharmonyutica/order"
REQUEST_URI
"/restaurant/grandharmonyutica/order"
SCRIPT_NAME
"/restaurant/grandharmonyutica/order"
PHP_SELF
"/restaurant/grandharmonyutica/order"
REQUEST_TIME_FLOAT
1750772316.891
REQUEST_TIME
1750772316
empty
0. Whoops\Handler\PrettyPageHandler