Gifts: fix crash if user is not logged in

This commit is contained in:
Celestora 2021-10-12 08:59:36 +00:00 committed by Celestora
parent ac733fb462
commit e782d502b8

View file

@ -165,7 +165,7 @@
</div>
<div class="ovk-avView">
<div class="ovk-avView--el" n:foreach="$user->getGifts(1, 3) as $giftDescriptor">
{var hideInfo = $giftDescriptor->anon ? $thisUser->getId() !== $user->getId() : false}
{var hideInfo = !is_null($thisUser) ? ($giftDescriptor->anon ? $thisUser->getId() !== $user->getId() : false) : false}
<a href="{$hideInfo ? 'javascript:false' : $giftDescriptor->sender->getURL()}">
<img class="ava"