Skip to content
Snippets Groups Projects
Commit 128101d6 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Correction pb suite modif gestion des floats

parent 6f04d50f
Branches
Tags
No related merge requests found
Pipeline #30680 passed
......@@ -481,14 +481,15 @@ class Table
if (in_array($c, $options['update-only-null']) && $oldc !== null) $ok = false;
if ($ok) {
if ((is_float($newc) || is_double($newc))
&& (is_float($oldc) || is_double($oldc))
&& abs($newc - $oldc) > 0.0000000001
) {
if ((is_float($newc) || is_double($newc)) && (is_float($oldc) || is_double($oldc))) {
if (abs($newc - $oldc) > 0.0000000001) {
// nécessaire à cause des pb de précision des float/doubles en PHP :
// dans ce cas, on considère quand même que les 2 chiffres sont identiques
$toUpdate[$c] = $n[$c];
}
}else{
$toUpdate[$c] = $n[$c];
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment