diff --git a/db/pull.php b/db/pull.php index 30160d38a7cf2ae17b9cd51e3a7c442831e95edf..be8e23c55aa6436cfc64d8ebe18b7d04abd7656e 100644 --- a/db/pull.php +++ b/db/pull.php @@ -240,11 +240,11 @@ while ($row = pg_fetch_all($result)) { echo '
'; } if ($location) { - $country = $location['country_code']; - $city = isset($location['city']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['city']) : null; - $state = isset($location['region']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['region']) : null; - $lat = $location['latitude']; - $long = $location['longitude']; + $country = isset($location['country_code']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['country_code']) : "n/a"; + $city = isset($location['city']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['city']) : "n/a"; + $state = isset($location['region']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['region']) : "n/a"; + $lat = isset($location['latitude']) ? $location['latitude']: "n/a"; + $long = isset($location['longitude']) ? $location['longitude'] : "n/a"; //if lat and long are just a generic country with no detail lets make some tail up or openmap just stacks them all on top another if (strlen($lat) < 4) { $lat = $lat + (rand(1, 15) / 10);