Error
Call to undefined function isSimplePhoneNumber() Error thrown with message "Call to undefined function isSimplePhoneNumber()" Stacktrace: #4 Error in /home/deploy/EHungry-4/Web/templates3.0/customer/schema.php:27 #3 {closure} in /home/deploy/EHungry-4/Web/templates3.0/customer/schema.php:277 #2 include_once in /home/deploy/EHungry-4/Web/templates3.0/customer/header.php:320 #1 include_once in /home/deploy/EHungry-4/Web/controllers/customer.php:860 #0 require in /home/deploy/EHungry-4/Web/index.php:30
Stack frames (5)
4
Error
/
home
/
deploy
/
EHungry-4
/
Web
/
templates3.0
/
customer
/
schema.php
27
3
{closure}
/
home
/
deploy
/
EHungry-4
/
Web
/
templates3.0
/
customer
/
schema.php
277
2
include_once
/
home
/
deploy
/
EHungry-4
/
Web
/
templates3.0
/
customer
/
header.php
320
1
include_once
/
home
/
deploy
/
EHungry-4
/
Web
/
controllers
/
customer.php
860
0
require
/
home
/
deploy
/
EHungry-4
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-4
/
Web
/
templates3.0
/
customer
/
schema.php
        case 'home':
        case 'locationinfo':
            //single location account
            if (is_object($restaurant)) {
                $cacheKey = sprintf('%d_home_%d_schema', $restaurant->id, $currentOrderingPlatform); // sc-61324: different platforms need different caches so the URLs can be different
                $cachedJson = Cache::Get($cacheKey);
                if ($cachedJson) {
                    echo $cachedJson;
                    break;
                }
 
                $host   = getInsecureHost();
                $hostrt = rtrim($host, '/');
                $json   = [
                    '@context'   => 'http://schema.org',
                    '@type'      => 'Restaurant',
                    '@id'        => $host.'#restaurant',
                    'name'       => $restaurant->getDisplayName(),
                    'url'        => $host,
                    'telephone'  => '+'.isSimplePhoneNumber($restaurant->getPrimaryPhone(), true),
                    'address'    => [
                        '@type'           => 'PostalAddress',
                        'streetAddress'   => $restaurant->getStreet1(),
                        'addressLocality' => $restaurant->getCity(),
                        'addressRegion'   => $restaurant->getState(),
                        'postalCode'      => $restaurant->getZip(),
                        'addressCountry'  => in_array($restaurant->getState(), $provinces)? 'CA' : 'US'
                    ],
                    'hasMap'     => 'https://maps.google.com/?q='.urldecode(
                        $restaurant->getDisplayName().', '.$restaurant->getStreet1().', '.$restaurant->getCity().', '.$restaurant->getState().', '.$restaurant->getZip()
                    ),
                    'priceRange' => '$$',
                ];
 
                if ($restaurant->getCuisineType()) {
                    $json['servesCuisine'] = $restaurant->getCuisineType();
                }
 
                $imageUrl = false;
                //use header logo
Arguments
  1. "Call to undefined function isSimplePhoneNumber()"
    
/
home
/
deploy
/
EHungry-4
/
Web
/
templates3.0
/
customer
/
schema.php
                                        }
                                        $itemJson['offers'][] = $priceJson;
                                    }
                                }
 
                                $categoryJson['hasMenuItem'][] = $itemJson;
                            }
                        }
                    }
                    $json['hasMenuSection'][] = $categoryJson;
                }
            }
 
            $schemaScript = '<script type="application/ld+json">'.json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).'</script>';
            Cache::Set($cacheKey, $schemaScript);
            echo $schemaScript;
            break;
    }
};
$printSchema();
 
/
home
/
deploy
/
EHungry-4
/
Web
/
templates3.0
/
customer
/
header.php
                                <? } elseif (IS_EMBEDDED_INLINE) { ?>
                                    const overlay = jQuery('<div id="overlay" style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;background-color: #000;opacity: 0.9;z-index: 10000;"><div style="margin-top:10%;height:50px;font-weight:bold;font-size:150%;text-align:center;">Cookies are required for online ordering. <span style="color: #ffffff;">Click here to allow cookies</span>.<br><a href="<?=$account->getDomainUrl()?>" target="_blank" aria-label="Opens in new tab" title="Opens in new tab" id="notworking">Not working? Click here to open ordering in a new window.</a></div></div>');
 
                                    overlay.appendTo(document.body).on('click', function (event) {
                                        if (event.target.id != 'notworking') {
                                            console.log('overlay clicked')
                                            window.open("<?=$account->getDomainUrl()?>/setcookie", '_blank', 'width=20,height=20')
                                        }
                                    });
                                <? } ?>
                            } else {
                                Cookies.remove('test')
                            }
                        }
                    }
                });
            </script>
        <? } ?>
 
        <? include_once(CORE_PATH.'templates3.0/customer/schema.php');
        include_once(CORE_PATH.'templates3.0/customer/google_analytics.php');
 
        if (isset($account) && $account->getFacebookPixelId()) { ?>
            <!-- Facebook Pixel Code -->
            <script>
            !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
            n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
            n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
            t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
            document,'script','https://connect.facebook.net/en_US/fbevents.js');
            fbq('init', '<?=$account->getFacebookPixelId()?>');
            fbq('track', 'PageView');
            </script>
            <noscript><img height="1" width="1" style="display:none"
            src="https://www.facebook.com/tr?id=<?=$account->getFacebookPixelId()?>&ev=PageView&noscript=1"
            /></noscript>
            <!-- DO NOT MODIFY -->
            <!-- End Facebook Pixel Code -->
            
<?
Arguments
  1. "/home/deploy/EHungry-4/Web/templates3.0/customer/schema.php"
    
/
home
/
deploy
/
EHungry-4
/
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-4/Web/templates3.0/customer/header.php"
    
/
home
/
deploy
/
EHungry-4
/
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-4/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/demoaccount/locationinfo"
empty
empty
Key Value
PHPSESSID
"h4jau5fo5vl8q8n64u72cn2tpg"
Key Value
loc
"en_US"
customer_account_id
5677
cart
Cart {}
restaurant_id
6312
menu_id
8178
Key Value
UNIQUE_ID
"aZt72e44Ude2orlI9dfRqAAAAAA"
SCRIPT_URL
"/restaurant/demoaccount/locationinfo"
SCRIPT_URI
"http://www.springroll.com.4.martin.ehungry.net/restaurant/demoaccount/locationinfo"
HTTP_HOST
"www.springroll.com.4.martin.ehungry.net"
HTTP_X_REAL_IP
"216.73.216.114"
HTTP_X_FORWARDED_FOR
"216.73.216.114"
HTTP_X_CONFKEY
"Main_Domain:13129"
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=h4jau5fo5vl8q8n64u72cn2tpg"
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.4.martin.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-4/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-4/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-4/Web/index.php"
REMOTE_PORT
"48442"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/demoaccount/locationinfo"
REQUEST_URI
"/restaurant/demoaccount/locationinfo"
SCRIPT_NAME
"/restaurant/demoaccount/locationinfo"
PHP_SELF
"/restaurant/demoaccount/locationinfo"
REQUEST_TIME_FLOAT
1771797465.382
REQUEST_TIME
1771797465
empty
0. Whoops\Handler\PrettyPageHandler