diff --git a/src/USCensus.php b/src/USCensus.php index ed8ab3f..dc09c9b 100644 --- a/src/USCensus.php +++ b/src/USCensus.php @@ -65,7 +65,8 @@ protected function getQueryString(Address $address) { protected function getLatLngFromResult(\stdClass $result) { $return = FALSE; - if ($result) { + if ($result && property_exists($result, "result")) { + $result = $result->result; if (property_exists($result, "addressMatches") && count($result->addressMatches) > 0) { $return = new LatLng; $return->latitude = $result->addressMatches[0]->coordinates->y;