11 restaurants in the area
Error
Stack frames (8)
7
Error
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
772
6
Marketplace
\RestaurantListRoute
collection
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
762
5
Marketplace
\RestaurantListRoute
restaurantCollection
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
507
4
Marketplace
\RestaurantListRoute
restaurantList
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
96
3
Marketplace
\RestaurantListRoute
restaurantsByStateAndCity
/
home
/deploy
/EHungry-2-joel
/Web
/Services
/Router.php
44
2
eHungry
\Services
\Router
handle
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/router.php
27
1
include
/
home
/deploy
/EHungry-2-joel
/Web
/controllers
/marketplace.php
2
0
require
/
home
/deploy
/EHungry-2-joel
/Web
/index.php
30
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
'class' => 'collection_card flex-shrink-0 d-block rounded-2 text-dark text-decoration-none',
'href' => $account->formatCustomerOrderLinkForCurrentPlatform($restaurant),
'onclick' => static::confirmNewCart($cart, $restaurant),
], static::collectionCard($restaurant, ['class' => 'h-100']));
}
return static::collection(array_merge([
'show_controls' => count($restaurants) > 1,
'scroll_step' => "$(this).find('.collection_card').width() + 16",
'breakout' => '0',
], $attrs), $children);
}
private static function confirmNewCart(\Cart $cart, \Restaurant $restaurant) {
return count($cart->cartItems) > 0 && $restaurant->id !== \eHungry\Services\Restaurant::getRestaurantId()
? "return window.confirm(`Switching to $restaurant->display_name will clear your cart. Press OK to start a new order or Cancel to keep your current order from ".\eHungry\Services\Restaurant::getRestaurant()->display_name.".`)"
: null;
}
private static function collection($attrs, $children) {
return \EDS\Collection(
array_merge($attrs, [
'class' => 'mt-5 mb-4 ' . ($attrs['class'] ?? ''),
'padding' => 'px-4 px-' . static::BREAKPOINT . '-0',
'title' => '<div class="fw-medium" style="font-family: var(--springroll-font-display)">' . $attrs['title'] . '</div>',
'gradient_color' => 'var(--bs-light)',
]),
$children
);
}
private static function promotionCard($attrs = []) {
$props = \EDS\defaults($attrs, [
'class' => '',
'style' => '',
'title' => '',
'description' => '',
'url' => '',
'image' => '',
'alt' => '',
'start_date' => '',
Arguments
"Call to undefined function EDS\Collection()"
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
}
private static function restaurantCollection($attrs, $restaurants) {
$cart = \eHungry\Services\Cart::getCart();
$children = [];
foreach ($restaurants as $restaurant) {
$account = new \Account($restaurant->account_id);
$children[] = \EDS\html('a', [
'id' => 'restaurant_collection_' . $restaurant->id,
'class' => 'collection_card flex-shrink-0 d-block rounded-2 text-dark text-decoration-none',
'href' => $account->formatCustomerOrderLinkForCurrentPlatform($restaurant),
'onclick' => static::confirmNewCart($cart, $restaurant),
], static::collectionCard($restaurant, ['class' => 'h-100']));
}
return static::collection(array_merge([
'show_controls' => count($restaurants) > 1,
'scroll_step' => "$(this).find('.collection_card').width() + 16",
'breakout' => '0',
], $attrs), $children);
}
private static function confirmNewCart(\Cart $cart, \Restaurant $restaurant) {
return count($cart->cartItems) > 0 && $restaurant->id !== \eHungry\Services\Restaurant::getRestaurantId()
? "return window.confirm(`Switching to $restaurant->display_name will clear your cart. Press OK to start a new order or Cancel to keep your current order from ".\eHungry\Services\Restaurant::getRestaurant()->display_name.".`)"
: null;
}
private static function collection($attrs, $children) {
return \EDS\Collection(
array_merge($attrs, [
'class' => 'mt-5 mb-4 ' . ($attrs['class'] ?? ''),
'padding' => 'px-4 px-' . static::BREAKPOINT . '-0',
'title' => '<div class="fw-medium" style="font-family: var(--springroll-font-display)">' . $attrs['title'] . '</div>',
'gradient_color' => 'var(--bs-light)',
]),
$children
);
}
Arguments
array:5 [ "show_controls" => false "scroll_step" => "$(this).find('.collection_card').width() + 16" "breakout" => "0" "id" => "featured" "title" => "Featured" ]
[]
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
<?
$mapped_restaurants = [];
foreach ($filtered_restaurants as $restaurant) {
$mapped_restaurants[] = [
'id' => $restaurant->id,
'name' => $restaurant->display_name,
'lat' => $restaurant->getLatitude(),
'lng' => $restaurant->getLongitude(),
];
}
?>
$(() => setMapRestaurants(<?=json_encode($mapped_restaurants)?>));
</script>
<? // Results ?>
<div id="restaurant-list">
<div id="collections">
<? $has_active_filters = count($active_params) > 0; ?>
<? if (!$has_active_filters) { ?>
<?=static::restaurantCollection(['id' => 'featured', 'title' => 'Featured'], DataService::getFeaturedRestaurants($coordinates))?>
<?=static::restaurantCollection(['id' => 'new', 'title' => 'New on Springroll'], DataService::getNewRestaurants($coordinates))?>
<?=static::restaurantCollection(['id' => 'dealsandcoupons', 'title' => 'Deals & Coupons'], DataService::getDealsAndCoupons($coordinates))?>
<? // We're using Deals & Coupons collection for now, but keeping this here in case we want to use that big 2 cards per scroll design later
// Promotions
/*$promotions = DataService::getPromotions();
$promotionsHtml = '';
foreach ($promotions as $promotion) {
$promotionsHtml .= static::promotionCard($promotion);
}*/
?>
<?//=static::collection(['id' => 'promotions', 'title' => 'Promotions'], $promotionsHtml)?>
<? } ?>
</div>
<? // Filtered restaurants ?>
<div id="filtered-restaurants-container" class="mt-4 px-4 px-<?=static::BREAKPOINT?>-0">
<h2 class="eds-display-text-title-m fw-medium" style="font-family: var(--springroll-font-display)">Restaurants in the area</h2>
Arguments
array:2 [ "id" => "featured" "title" => "Featured" ]
[]
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/routes
/restaurant_list.php
}
return static::restaurantList($request);
}
public static function restaurantsByStateAndCity(array $params, array $request) {
$state = \EDS\undasherize($params['state']);
$city = \EDS\undasherize($params['city']);
$request = array_merge($request, static::getStateAndCityIfRestaurantsAvailable($state, $city));
$address = "$city, $state";
$request['search'] = $address;
$geocode_data = \ZipCode::getGeoLocation($address);
if ($geocode_data) {
$request['lat'] = $geocode_data[0];
$request['lng'] = $geocode_data[1];
}
return static::restaurantList($request);
}
private static function getStateAndCityIfRestaurantsAvailable(?string $state_or_abbr, ?string $city) {
$state_or_abbr = trim($state_or_abbr ?: '');
$city = trim($city ?: '');
$states = DataService::getStates();
$state_name = (
$state_or_abbr && array_key_exists($state_or_abbr, $states)
? $state_or_abbr
: (getStateFullName($state_or_abbr) && array_key_exists(getStateFullName($state_or_abbr), $states)
? getStateFullName($state_or_abbr)
: null)
);
$city_name = $state_name && in_array($city, $states[$state_name]) ? $city : null;
return ['state' => $state_name, 'city' => $city_name];
}
// Components
Arguments
array:9 [ "aid" => "restaurants/new-york/middletown" "status" => [] "controller" => "marketplace" "form" => "home" "state" => "New York" "city" => "Middletown" "search" => "Middletown, New York" "lat" => 41.4459271 "lng" => -74.4229341 ]
/
home
/deploy
/EHungry-2-joel
/Web
/Services
/Router.php
* public static function editUser(array $params, array $request) {}
* public static function deleteUser(array $params, array $request) {}
* }
* ```
*
* @return mixed
*/
public static function handle(string $method, string $url, array $request, array $route_classes) {
$account_id_string = Account::getAccountIdString();
$unprefixed_url = $account_id_string
? preg_replace("/^\/$account_id_string/", '', $url)
: $url;
foreach ($route_classes as $route_class) {
$routes = $route_class::ROUTES;
foreach ($routes as $path => $handler) {
$params = [];
if (preg_match("/^$path\/?$/i", "$method $unprefixed_url", $params)) {
return $route_class::$handler($params, $request);
}
}
}
http_response_code(404);
return '<div class="px-4 py-3">' . \EDS\Alert(['variant' => 'danger'], 'Not Found') . '</div>';
}
}
Arguments
array:5 [ 0 => "GET /restaurants/new-york/middletown" "state" => "new-york" 1 => "new-york" "city" => "middletown" 2 => "middletown" ]
array:9 [ "aid" => "restaurants/new-york/middletown" "status" => [] "controller" => "marketplace" "form" => "home" "state" => "New York" "city" => "Middletown" "search" => "Middletown, New York" "lat" => 41.4459271 "lng" => -74.4229341 ]
/
home
/deploy
/EHungry-2-joel
/Web
/marketplace
/router.php
require_once(CORE_PATH . 'auth/forgotpassword.php');
require_once(CORE_PATH . 'auth/login.php');
require_once(CORE_PATH . 'auth/register.php');
require_once(CORE_PATH . 'marketplace/assets/assets.php');
require_once(__DIR__ . '/routes/landing.php');
require_once(__DIR__ . '/routes/campaigns.php');
require_once(__DIR__ . '/routes/product.php');
require_once(__DIR__ . '/routes/restaurant_list.php');
require_once(__DIR__ . '/routes/restaurant_details.php');
require_once(__DIR__ . '/routes/support.php');
require_once(__DIR__ . '/routes/generatedfilesroute.php');
$handler_output = \eHungry\Services\Router::handle(
$_SERVER['REQUEST_METHOD'],
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? '/',
$_REQUEST,
[
\AccountSettings\ProfileInfoRoutes::class,
\AccountSettings\BasicInformationRoutes::class,
\AccountSettings\ChangePasswordRoutes::class,
\AccountSettings\AddressRoutes::class,
\AccountSettings\PaymentMethodRoutes::class,
\AccountSettings\CommunicationRoutes::class,
\AccountSettings\CampaignsRoutes::class,
\AccountSettings\AccountRoutes::class,
\AccountSettings\OrderRoutes::class,
\AccountSettings\CouponRoutes::class,
\Auth\ForgotPasswordRoutes::class,
\Auth\LoginRoutes::class,
\Auth\RegisterRoutes::class,
LandingRoute::class,
CampaignsRoute::class,
ProductRoute::class,
RestaurantListRoute::class,
RestaurantPageRoute::class,
SupportRoutes::class,
Arguments
"GET""/restaurants/new-york/middletown"array:4 [ "aid" => "restaurants/new-york/middletown" "status" => [] "controller" => "marketplace" "form" => "home" ]
array:20 [ 0 => "AccountSettings\ProfileInfoRoutes" 1 => "AccountSettings\BasicInformationRoutes" 2 => "AccountSettings\ChangePasswordRoutes" 3 => "AccountSettings\AddressRoutes" 4 => "AccountSettings\PaymentMethodRoutes" 5 => "AccountSettings\CommunicationRoutes" 6 => "AccountSettings\CampaignsRoutes" 7 => "AccountSettings\AccountRoutes" 8 => "AccountSettings\OrderRoutes" 9 => "AccountSettings\CouponRoutes" 10 => "Auth\ForgotPasswordRoutes" 11 => "Auth\LoginRoutes" 12 => "Auth\RegisterRoutes" 13 => "Marketplace\LandingRoute" 14 => "Marketplace\CampaignsRoute" 15 => "Marketplace\ProductRoute" 16 => "Marketplace\RestaurantListRoute" 17 => "Marketplace\RestaurantPageRoute" 18 => "Marketplace\SupportRoutes" 19 => "Marketplace\GeneratedFilesRoute" ]
/
home
/deploy
/EHungry-2-joel
/Web
/controllers
/marketplace.php
<? include(CORE_PATH . 'marketplace/router.php');
Arguments
"/home/deploy/EHungry-2-joel/Web/marketplace/router.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
"/home/deploy/EHungry-2-joel/Web/controllers/marketplace.php"
Environment & details:
| Key | Value |
| aid | "restaurants/new-york/middletown"
|
empty
empty
| Key | Value |
| PHPSESSID | "5tm9ifgbg4i25d5m8o8jr992is"
|
| Key | Value |
| loc | "en_US"
|
| customer_account_id | 34393
|
| cart | Cart {}
|
| restaurant_id | 16003
|
| menu_id | 19280
|
| Key | Value |
| UNIQUE_ID | "aWWc1COlx2NTdnnjGdTV-QAAAAI"
|
| SCRIPT_URL | "/restaurants/new-york/middletown"
|
| SCRIPT_URI | "http://www.springroll.com.2.joel.ehungry.net/restaurants/new-york/middletown"
|
| 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"
|
| HTTP_COOKIE | "PHPSESSID=5tm9ifgbg4i25d5m8o8jr992is"
|
| 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 | "40206"
|
| GATEWAY_INTERFACE | "CGI/1.1"
|
| SERVER_PROTOCOL | "HTTP/1.0"
|
| REQUEST_METHOD | "GET"
|
| QUERY_STRING | "aid=restaurants/new-york/middletown"
|
| REQUEST_URI | "/restaurants/new-york/middletown"
|
| SCRIPT_NAME | "/restaurants/new-york/middletown"
|
| PHP_SELF | "/restaurants/new-york/middletown"
|
| REQUEST_TIME_FLOAT | 1768266964.339
|
| REQUEST_TIME | 1768266964
|
empty
0. Whoops\Handler\PrettyPageHandler