PHRAS-2126_Array-to-String-err-idx_4.1 (#2658)

* PHRAS-2126_Array-to-String-err-idx_4.1
fix : es error message during indexation is now dumped (not always a string)
fix : es file "size" is now type "long"

* PHRAS-2126_Array-to-String-err-idx_4.1
fix : bad gps coordinate are ignored by es indexation.

* PHRAS-2126_Array-to-String-err-idx_4.1
fix : gps coordinate can de negative.
This commit is contained in:
jygaulier
2018-07-03 17:32:22 +02:00
committed by GitHub
parent f7e9f115dc
commit cbed6488c6

View File

@@ -34,12 +34,18 @@ class GpsPosition
switch ($tag_name) {
case self::LONGITUDE_TAG_NAME:
Assertion::numeric($value);
$this->longitude = (float) $value;
$value = (float) $value;
if($value >= -180.0 && $value <= 180.0 ) {
$this->longitude = $value;
}
break;
case self::LATITUDE_TAG_NAME:
Assertion::numeric($value);
$this->latitude = (float) $value;
$value = (float) $value;
if($value >= -90.0 && $value <= 90.0 ) {
$this->latitude = $value;
}
break;
case self::LONGITUDE_REF_TAG_NAME: