[-] BO : fixed issue with dot and comma in import for floating numbers #PSCFV-3609

This commit is contained in:
dMetzger
2012-08-16 12:04:40 +00:00
parent 4a8f0bb0c7
commit 1994ca0675
+7 -2
View File
@@ -760,7 +760,13 @@ class AdminImportControllerCore extends AdminController
$entity->{$key}[$id_lang_tmp] = $value;
}
else
{
// If the type is float, we need to cast it in order to avoid problem with "," and ".".
$class = get_class($entity);
if (isset($class::$definition['fields'][$key]['type']) && $class::$definition['fields'][$key]['type'] == ObjectModel::TYPE_FLOAT)
$infos = (float)$infos;
$entity->{$key} = isset(self::$validators[$key]) ? call_user_func(self::$validators[$key], $infos) : $infos;
}
return true;
}
@@ -2669,5 +2675,4 @@ class AdminImportControllerCore extends AdminController
die;
}
}
}
}