Page 1 of 1

updateCurrencies needs to be fixed

Posted: Mon Aug 10, 2009 1:49 pm
by traja
I found that updateCurrencies function, which updates currency rate automatically at every administrators' login, needs to be fix.

Around line 110, in /admin/model/localisation/currency.php

Code: Select all

$this->db->query("UPDATE " . DB_PREFIX . "currency SET value = '" . (float)$value . "', date_modified = NOW() WHERE code = '" . (int)$currency . "'");
You don't need (int) casting before $currency, because currency code is string.

You can just delete (int) or replace to (string)to fix.

Re: updateCurrencies needs to be fixed

Posted: Mon Aug 10, 2009 6:46 pm
by Daniel
thansk for spotting this!