1
0
Эх сурвалжийг харах

Merge pull request #353 from pixelfed/frontend-ui-refactor

Update Status model
daniel 7 жил өмнө
parent
commit
9dba310f2f
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      app/Status.php

+ 3 - 0
app/Status.php

@@ -92,6 +92,9 @@ class Status extends Model
 
     public function bookmarked()
     {
+      if(!Auth::check()) {
+        return 0;
+      }
       $profile = Auth::user()->profile;
       return Bookmark::whereProfileId($profile->id)->whereStatusId($this->id)->count();
     }