#3481 [advs-module] Currency error when viewing an ad

This commit is contained in:
Diatrex 2021-03-04 13:30:38 +03:00
parent 0db3fbec95
commit c74b8139e3

View File

@ -592,7 +592,7 @@ class AdvsController extends PublicController
$foreign_currencies = json_decode($adv->foreign_currencies, true);
if ($_COOKIE['currency'] && $adv->foreign_currencies && array_key_exists($_COOKIE['currency'], $foreign_currencies)) {
if (isset($_COOKIE['currency']) && $_COOKIE['currency'] && $adv->foreign_currencies && array_key_exists($_COOKIE['currency'], $foreign_currencies)) {
$adv->currency = $_COOKIE['currency'];
$adv->price = $foreign_currencies[$_COOKIE['currency']];
}