소스 검색

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

Update Status model
daniel 7 년 전
부모
커밋
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();
     }