diff --git a/app/Transformer/Api/RelationshipTransformer.php b/app/Transformer/Api/RelationshipTransformer.php index 89e1decd8..a736eed49 100644 --- a/app/Transformer/Api/RelationshipTransformer.php +++ b/app/Transformer/Api/RelationshipTransformer.php @@ -14,6 +14,9 @@ class RelationshipTransformer extends Fractal\TransformerAbstract public function transform(Profile $profile) { $auth = Auth::check(); + if(!$auth) { + return []; + } $user = $auth ? Auth::user()->profile : false; $requested = false; if($user) {