| Project: | Gift Certificate Module |
| Component: | Code |
| Category: | |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Came across a floating point comparison problem.
In uc_payment_method_zero_total()
if ($total != 0) {
$result[] = array(
'pass' => FALSE,
'message' => t("Your final order total is $total, not $0. Please go back and select a different method of payment.")
);
Testing against ZERO is bad and might fail, this should be replaced by something like
if ($total > 0.001)
At least this fix worked for me.
More info here:
http://www.ubercart.org/forum/bug_reports/4620




Honestly I haven't dug that much into it so that might be kind of a silly question to ask, so I will check out your link as well. Thanks, Ryan!