vdomah / blogviews

Extends the RainLab.Blog plugin to track post views
MIT License
4 stars 4 forks source link

Call to a member function getKey() on null while trying to view category page #6

Closed m-paniez9292 closed 4 years ago

m-paniez9292 commented 4 years ago

Hi, I encountered a little problem while trying yo view the category page. I get : ERROR We're sorry, but an unhandled error occurred. Please see the details below. Call to a member function getKey() on null C:\xampp\htdocs\yans-news\plugins\vdomah\blogviews\Plugin.php line 85

I finally succeeded by replacing the line 85 by the code below

if(is_null($post)){
                return;
            }else{
                $cookName = self::POST_VIEWED . $post->getKey();
            }:

From Octobercms forum (thanks to robertmaku32322)

Thanks

vdomah commented 4 years ago

fixed in 1.0.10 version. Thanks for report