[Tickets #10371] Problem with using and saving Gmap event

bugs at horde.org bugs at horde.org
Fri Jul 22 18:30:29 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10371
------------------------------------------------------------------------------
  Ticket             | 10371
  Created By         | adominguez at cne.gob.ve
  Summary            | Problem with using and saving Gmap event
  Queue              | Kronolith
  Version            | 3.0.5
  Type               | Bug
  State              | Unconfirmed
  Priority           | 3. High
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


adominguez at cne.gob.ve (2011-07-22 18:30) wrote:

Hi, there is a problem at the file ?horde/kronolith/lib/Geo/Sql.php?  
on function ?public function setLocation($event_id, $point)? (line 28)  
and that because the function print the float (to ?event_lat? an  
?event_lon? for the SQL query) number with ?,? as decimal separator  
instead of ?.?


I discovered that it's related with the php Environment Locale and the  
way as PHP converts a float to a strings, that's because PHP use that  
environment, if you have a script with:

<?php
$v= 5.3;
echo ($v);
?>

You ?ALWAYS? expect that the result will be '5.3', but that's ONLY  
true if you have 'setlocale(LC_ALL,'en_US.UTF-8' ); ', but if you are  
using the Spanish translation, Horde change that locale to  
'setlocale(LC_ALL,'es_ES.UTF-8' ); '  so the script's result will be  
'5,3'

So or the Horde framework is bad and miss a configuration to print  
float number into SQL or 'Kronolith' must adapt the string format of  
the float number in order to to do the SQL query.






More information about the bugs mailing list