Corrige le filtre FILTER_FLOAT: pour la géolocalisation

This commit is contained in:
Fred Tempez 2024-08-15 17:55:11 +02:00
parent 78905834bd
commit 1b3601ce87

View File

@ -432,7 +432,8 @@ class helper
$text = (int) $date->format('U'); $text = (int) $date->format('U');
break; break;
case self::FILTER_FLOAT: case self::FILTER_FLOAT:
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT); $text = str_replace(',', '.', $text); // Remplacer les virgules par des points
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
$text = (float) $text; $text = (float) $text;
break; break;
case self::FILTER_ID: case self::FILTER_ID: