Whoops! There was an error.
Whoops \ Exception \ ErrorException (E_WARNING)
Undefined array key 0 Whoops\Exception\ErrorException thrown with message "Undefined array key 0" Stacktrace: #3 Whoops\Exception\ErrorException in /home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/content/main.php:13 #2 Whoops\Run:handleError in /home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/content/main.php:13 #1 getLnt in /home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/content/main.php:18 #0 require in /home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/index.php:8
Stack frames (4)
3
Whoops\Exception\ErrorException
/route-management/create-pick-up-point/content/main.php13
2
Whoops\Run handleError
/route-management/create-pick-up-point/content/main.php13
1
getLnt
/route-management/create-pick-up-point/content/main.php18
0
require
/route-management/create-pick-up-point/index.php8
/home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/content/main.php
<?php
 
$lng=$lat=0;
 function getLnt($zip){
    global $GMAPI_KEY;
    $xy_array = array();
    
    $url = "https://maps.googleapis.com/maps/api/geocode/json?address=".urlencode($zip)."&sensor=false&key=$GMAPI_KEY";
    $result_string = file_get_contents($url);
    $result = json_decode($result_string, true);
    
    // print_r($result);
    $xy_array[0] = $result['results'][0]['geometry']['viewport']['northeast']['lat'];
    $xy_array[1] = $result['results'][0]['geometry']['viewport']['northeast']['lng'];
    return $xy_array;
}
 
list($lat,$lng) = getLnt("Singapore 569920");
// print_r(getLnt("310115"));
// exit();
    
    
// (A) CURL FETCH
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $API_URL."/student/all/BNL");
// curl_setopt($ch, CURLOPT_URL, "https://zxy.demo-work.net/address.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
 
$family_data_array = array(); 
$tmp_postal_code = array("99999");
 
// (B) RESULTS
// (B1) ERROR
if (curl_errno($ch)) { echo curl_error($ch); }
 
// (B2) JSON DECODE
else {
  // echo $result; // string
  $decoded = json_decode($result);
/home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/content/main.php
<?php
 
$lng=$lat=0;
 function getLnt($zip){
    global $GMAPI_KEY;
    $xy_array = array();
    
    $url = "https://maps.googleapis.com/maps/api/geocode/json?address=".urlencode($zip)."&sensor=false&key=$GMAPI_KEY";
    $result_string = file_get_contents($url);
    $result = json_decode($result_string, true);
    
    // print_r($result);
    $xy_array[0] = $result['results'][0]['geometry']['viewport']['northeast']['lat'];
    $xy_array[1] = $result['results'][0]['geometry']['viewport']['northeast']['lng'];
    return $xy_array;
}
 
list($lat,$lng) = getLnt("Singapore 569920");
// print_r(getLnt("310115"));
// exit();
    
    
// (A) CURL FETCH
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $API_URL."/student/all/BNL");
// curl_setopt($ch, CURLOPT_URL, "https://zxy.demo-work.net/address.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
 
$family_data_array = array(); 
$tmp_postal_code = array("99999");
 
// (B) RESULTS
// (B1) ERROR
if (curl_errno($ch)) { echo curl_error($ch); }
 
// (B2) JSON DECODE
else {
  // echo $result; // string
  $decoded = json_decode($result);
/home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/content/main.php
<?php
 
$lng=$lat=0;
 function getLnt($zip){
    global $GMAPI_KEY;
    $xy_array = array();
    
    $url = "https://maps.googleapis.com/maps/api/geocode/json?address=".urlencode($zip)."&sensor=false&key=$GMAPI_KEY";
    $result_string = file_get_contents($url);
    $result = json_decode($result_string, true);
    
    // print_r($result);
    $xy_array[0] = $result['results'][0]['geometry']['viewport']['northeast']['lat'];
    $xy_array[1] = $result['results'][0]['geometry']['viewport']['northeast']['lng'];
    return $xy_array;
}
 
list($lat,$lng) = getLnt("Singapore 569920");
// print_r(getLnt("310115"));
// exit();
    
    
// (A) CURL FETCH
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $API_URL."/student/all/BNL");
// curl_setopt($ch, CURLOPT_URL, "https://zxy.demo-work.net/address.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
 
$family_data_array = array(); 
$tmp_postal_code = array("99999");
 
// (B) RESULTS
// (B1) ERROR
if (curl_errno($ch)) { echo curl_error($ch); }
 
// (B2) JSON DECODE
else {
  // echo $result; // string
  $decoded = json_decode($result);
/home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/index.php
<?php
$pgtitle = 'Route Management: Create Pick Up / Drop Off Point';
require __DIR__.'/../../_global.php';
require GLOBAL_INCLUDES.'layouts/head.php';
require __DIR__.'/css/css.php';
require __DIR__.'/js/js.php';
require GLOBAL_INCLUDES.'layouts/body-start.php';
require __DIR__.'/content/main.php';
require GLOBAL_INCLUDES.'layouts/footer.php';

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH /usr/local/bin:/bin:/usr/bin
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_HOST zxy.demo-work.net
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
DOCUMENT_ROOT /home/demowadmin/zxy.demo-work.net
REMOTE_ADDR 216.73.216.215
REMOTE_PORT 7108
SERVER_ADDR 85.187.128.46
SERVER_NAME zxy.demo-work.net
SERVER_ADMIN webmaster@zxy.demo-work.net
SERVER_PORT 443
REQUEST_SCHEME https
REQUEST_URI /route-management/create-pick-up-point/
HTTPS on
X_SPDY HTTP2
SSL_PROTOCOL TLSv1.3
SSL_CIPHER TLS_AES_256_GCM_SHA384
SSL_CIPHER_USEKEYSIZE 256
SSL_CIPHER_ALGKEYSIZE 256
SCRIPT_FILENAME /home/demowadmin/zxy.demo-work.net/route-management/create-pick-up-point/index.php
QUERY_STRING
SCRIPT_URI https://zxy.demo-work.net/route-management/create-pick-up-point/
SCRIPT_URL /route-management/create-pick-up-point/
SCRIPT_NAME /route-management/create-pick-up-point/index.php
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE LiteSpeed
REQUEST_METHOD GET
X-LSCACHE on
PHP_SELF /route-management/create-pick-up-point/index.php
REQUEST_TIME_FLOAT 1778591813.203
REQUEST_TIME 1778591813
APP_ENV dev
APP_SECRET_KEY wrk6XNZbzeeett2h0i92kdEvfe8EyFQg
APP_SITENAME Local Server
SERVER_TYPE remote
URL_PORT
URL_NAME zxy.demo-work.net
URL_BASE https://zxy.demo-work.net
DB_NAME
DB_HOST
DB_USER
DB_PASS
DB_CHAR
DB_PORT
DB_PREFIX
SENDGRID
MAIL_SMTP isMail
MAIL_FROM
MAIL_MTO
MAIL_PORT
MAIL_HOST
MAIL_USER
MAIL_PASS
GST 0.08
Key Value
APP_ENV dev
APP_SECRET_KEY wrk6XNZbzeeett2h0i92kdEvfe8EyFQg
APP_SITENAME Local Server
SERVER_TYPE remote
URL_PORT
URL_NAME zxy.demo-work.net
URL_BASE https://zxy.demo-work.net
DB_NAME
DB_HOST
DB_USER
DB_PASS
DB_CHAR
DB_PORT
DB_PREFIX
SENDGRID
MAIL_SMTP isMail
MAIL_FROM
MAIL_MTO
MAIL_PORT
MAIL_HOST
MAIL_USER
MAIL_PASS
GST 0.08
0. Whoops\Handler\PrettyPageHandler