From d02ab1fef983fcf16d7a792cb00f146f7fc17784 Mon Sep 17 00:00:00 2001 From: Yudistira Date: Tue, 19 Mar 2024 12:20:38 +0700 Subject: [PATCH] add casting to double val to prevent string --- src/FHIRTenant/Location.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FHIRTenant/Location.php b/src/FHIRTenant/Location.php index 6f6538c..5f778fd 100644 --- a/src/FHIRTenant/Location.php +++ b/src/FHIRTenant/Location.php @@ -115,8 +115,8 @@ public function addPhysicalType($physical_type = null) public function addPosition($latitude = null, $longitude = null) { $this->location['position'] = [ - 'latitude' => $latitude ? $latitude : $this->profile->lat, - 'longitude' => $longitude ? $longitude : $this->profile->long, + 'latitude' => doubleval($latitude ? $latitude : $this->profile->lat), + 'longitude' => doubleval($longitude ? $longitude : $this->profile->long), ]; }