Bugfix for zip+4 master
authorroot <root@server1.cccp.slightlycyberpunk.com>
Sun, 2 Mar 2025 23:33:05 +0000 (23:33 +0000)
committerroot <root@server1.cccp.slightlycyberpunk.com>
Sun, 2 Mar 2025 23:33:05 +0000 (23:33 +0000)
taskRunner.php

index 7469476..b6292bf 100644 (file)
@@ -1062,7 +1062,7 @@ print_r($params);
                    " ".$resultsObj->results[0]->address->streetName;
         $resCity = $resultsObj->results[0]->address->municipality;
         $resState= $resultsObj->results[0]->address->countrySubdivision;
-        $resZip  = $resultsObj->results[0]->address->postalCode;
+        $resZip  = substr($resultsObj->results[0]->address->postalCode, 0, 5);
       } else if($tasks[$i]['taskName'] == "geocoder.census") {
         $url = "https://geocoding.geo.census.gov/geocoder/locations/onelineaddress?address=".urlencode($addr." ".$city." ".$state." ".$zip).
                "&format=json&benchmark=4";