Browse Source

Update StatusService, fix bug in getFull method

Daniel Supernault 2 years ago
parent
commit
4d8b4dcf35
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Services/StatusService.php

+ 3 - 0
app/Services/StatusService.php

@@ -121,6 +121,9 @@ class StatusService
 	public static function getFull($id, $pid, $publicOnly = true)
 	public static function getFull($id, $pid, $publicOnly = true)
 	{
 	{
 		$res = self::get($id, $publicOnly);
 		$res = self::get($id, $publicOnly);
+		if(!$res || !isset($res['account']) || !isset($res['account']['id'])) {
+			return $res;
+		}
 		$res['relationship'] = RelationshipService::get($pid, $res['account']['id']);
 		$res['relationship'] = RelationshipService::get($pid, $res['account']['id']);
 		return $res;
 		return $res;
 	}
 	}