Commit 642981fd authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(import): handle bad values for location attributes

parent 6a7ef010
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -42,9 +42,12 @@ class Location extends Entity
        $longitude = null;
        if ($geo !== null) {
            $geoArray = explode(',', substr($geo, 4));

            if (count($geoArray) === 2) {
                $latitude = (float) $geoArray[0];
                $longitude = (float) $geoArray[1];
            }
        }

        parent::__construct([
            'name'      => $name,
+2 −2