Skip to content

Commit a531804

Browse files
committed
chore: fix null exception
1 parent 3e47d1e commit a531804

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Services/Model/Imp/SummitLocationService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ public function updateLocation(Summit $summit, $location_id, array $data)
272272
if ($location instanceof SummitGeoLocatedLocation && $this->hasGeoLocationData2Update($data)) {
273273
try {
274274
$geo_location_strategy = GeoLocationStrategyFactory::build($location);
275-
$geo_location_strategy->doGeoLocation($location, $this->geo_coding_api);
275+
if(!is_null($geo_location_strategy))
276+
$geo_location_strategy->doGeoLocation($location, $this->geo_coding_api);
276277
} catch (GeoCodingApiException $ex1) {
277278
Log::warning($ex1->getMessage());
278279
$validation_msg = trans('validation_errors.LocationService.addLocation.geoCodingGenericError');

0 commit comments

Comments
 (0)