6ui11em / kirbycms-bootstrap-blog-starterkit

Kirby CMS blog starterkit theme using bootstrap framework,
Other
1 stars 2 forks source link

Error: Call to a member function avatar() on null #1

Open ekoplanet opened 7 years ago

ekoplanet commented 7 years ago

Hi 6ui11em i've changed your bootstrap-blog-starterkit, by uploading the actuall panel and kirby folders. Everthing is working fine, except the blog part. The "post-footer.php" snippet throws the above mentioned error. So I'm no programmer. What's going wrong here? Could you help? Thanks, eko

6ui11em commented 7 years ago

I'm out on vacations and I can not update the repo, but, try to change this line:

<?php if($avatar = $site->user((string)$post->author())->avatar()): ?>

To:

<?php if($user = $site->user((string)$post->author())): $avatar = $user->avatar()); ?>

Hope this can fix your problem by the moment. I will try to update the repo when coming back at work.