Browse Source

hack to convert from object to array

pull/31/head
Aaron Parecki 6 years ago
parent
commit
917cc9c1d8
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      compass/app/Jobs/TripComplete.php

+ 2
- 2
compass/app/Jobs/TripComplete.php View File

@ -114,10 +114,10 @@ class TripComplete extends Job implements SelfHandling, ShouldQueue
// If there are no start/end coordinates in the request, use the first and last coordinates // If there are no start/end coordinates in the request, use the first and last coordinates
if(count($features)) { if(count($features)) {
if(!array_key_exists('start_location', $this->_data['properties'])) { if(!array_key_exists('start_location', $this->_data['properties'])) {
$this->_data['properties']['start_location'] = $features[0];
$this->_data['properties']['start_location'] = json_decode(json_encode($features[0]), true);
} }
if(!array_key_exists('end_location', $this->_data['properties'])) { if(!array_key_exists('end_location', $this->_data['properties'])) {
$this->_data['properties']['end_location'] = $features[count($features)-1];
$this->_data['properties']['end_location'] = json_decode(json_encode($features[count($features)-1]), true);
} }
} }

Loading…
Cancel
Save