Quellcode durchsuchen

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

Update Status model
daniel vor 7 Jahren
Ursprung
Commit
9dba310f2f
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  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();
     }