Index: branches/5.2.x/units/currencies/currencies_event_handler.php =================================================================== diff -u -N -r16601 -r16812 --- branches/5.2.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 16601) +++ branches/5.2.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 16812) @@ -1,6 +1,6 @@ Application->GetVar('curr_iso'); + $currency_iso = $this->Application->GetVar('curr_iso', ''); + + $sql = 'SELECT CurrencyId + FROM ' . TABLE_PREFIX . 'Currencies + WHERE ISO = ' . $this->Conn->qstr($currency_iso) . ' AND Status = ' . STATUS_ACTIVE; + $currency_id = $this->Conn->GetOne($sql); + + if ( $currency_id === false ) { + return; + } + $available_currencies = $this->Application->siteDomainField('Currencies'); if ($available_currencies) { - if (strpos($available_currencies, '|' . $currency_iso . '|') === false) { + if (strpos($available_currencies, '|' . $currency_id . '|') === false) { // currency isn't allowed in site domain return ; }