mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3481 [advs-module] Currency error when viewing an ad
This commit is contained in:
parent
21128aa5ee
commit
43c457a048
@ -257,7 +257,7 @@ class AdvsController extends PublicController
|
||||
$advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
||||
|
||||
$foreign_currencies = json_decode($advs[$index]->foreign_currencies, true);
|
||||
if ($_COOKIE['currency'] && $advs[$index]->foreign_currencies && array_key_exists($_COOKIE['currency'], $foreign_currencies)) {
|
||||
if (isset($_COOKIE['currency']) && $_COOKIE['currency'] && $advs[$index]->foreign_currencies && array_key_exists($_COOKIE['currency'], $foreign_currencies)) {
|
||||
$advs[$index]->currency = $_COOKIE['currency'];
|
||||
$advs[$index]->price = $foreign_currencies[$_COOKIE['currency']];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user