From 917cc9c1d8b25ec761d3ce85b9f1aac85605768e Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Tue, 16 Oct 2018 15:41:40 +0200 Subject: [PATCH] hack to convert from object to array --- compass/app/Jobs/TripComplete.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compass/app/Jobs/TripComplete.php b/compass/app/Jobs/TripComplete.php index 9f90923..88e8c84 100644 --- a/compass/app/Jobs/TripComplete.php +++ b/compass/app/Jobs/TripComplete.php @@ -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(count($features)) { 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'])) { - $this->_data['properties']['end_location'] = $features[count($features)-1]; + $this->_data['properties']['end_location'] = json_decode(json_encode($features[count($features)-1]), true); } }