@@ -34,15 +34,15 @@ |
||
34 | 34 | if(isset($_GET['city'])) { |
35 | 35 | $url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . htmlspecialchars($_GET['city']) . '&key=AIzaSyCwhnja-or07012HqrhPW7prHEDuSvFT4w'; |
36 | 36 | $result = Requests::post($url); |
37 | - if(json_decode($result->body, true)['status'] == 'ZERO_RESULTS' || json_decode($result->body, true)['status'] == 'INVALID_REQUEST') |
|
37 | + if(json_decode($result->body, TRUE)['status'] == 'ZERO_RESULTS' || json_decode($result->body, TRUE)['status'] == 'INVALID_REQUEST') |
|
38 | 38 | { |
39 | 39 | $newPositionStatus = "0 results"; |
40 | 40 | } |
41 | 41 | else |
42 | 42 | { |
43 | 43 | $location = new Location(); |
44 | - $location->setLat(json_decode($result->body, true)['results']['0']['geometry']['location']['lat']); |
|
45 | - $location->setLng(json_decode($result->body, true)['results']['0']['geometry']['location']['lng']); |
|
44 | + $location->setLat(json_decode($result->body, TRUE)['results']['0']['geometry']['location']['lat']); |
|
45 | + $location->setLng(json_decode($result->body, TRUE)['results']['0']['geometry']['location']['lng']); |
|
46 | 46 | $location->setCityName(htmlspecialchars($_GET['city'])); |
47 | 47 | $accountCreator = new UpdateLocation(); |
48 | 48 | $accountCreator->setLocation($location); |