瀏覽代碼

Fix geolocation returning as string

Alan Lam 8 年之前
父節點
當前提交
065701ba15
共有 1 個文件被更改,包括 4 次插入 和 1 次删除
  1. 4 1
      engine/location.php

+ 4 - 1
engine/location.php

@@ -28,7 +28,10 @@ class Location extends Model {
 	}
 
 	public function getGeolocation() {
-		return [$this->latitude, $this->longitude];
+		return [
+			doubleval($this->latitude),
+			doubleval($this->longitude)
+		];
 	}
 
 	public function getPhotos() {