Преглед на файлове

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;
 	}