Skip to content
Extraits de code Groupes Projets
Valider d3de7b6e rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

do not lose value in case it is an integer or a float. Instead convert it to a string.

Eg this returned the default value in the past: `Common::getRequestVar('param', 'string', 'default', array('param' => 5))` which can happen eg in BulkTracking etc. causing many values not to be tracked. Wondering if it breaks anything.
parent a8917239
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -471,7 +471,13 @@ class Common
$ok = false;
if ($varType === 'string') {
if (is_string($value)) $ok = true;
if (is_string($value) || is_int($value)) {
$ok = true;
} else if (is_float($value)) {
$value = Common::forceDotAsSeparatorForDecimalPoint($value);
$ok = true;
}
} elseif ($varType === 'integer') {
if ($value == (string)(int)$value) $ok = true;
} elseif ($varType === 'float') {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter