浏览代码

Update StatusService, fix bug in getFull method

Daniel Supernault 2 年之前
父节点
当前提交
4d8b4dcf35
共有 1 个文件被更改,包括 3 次插入0 次删除
  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)
 	{
 		$res = self::get($id, $publicOnly);
+		if(!$res || !isset($res['account']) || !isset($res['account']['id'])) {
+			return $res;
+		}
 		$res['relationship'] = RelationshipService::get($pid, $res['account']['id']);
 		return $res;
 	}