mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user