diff --git a/VKAPI/Handlers/Users.php b/VKAPI/Handlers/Users.php index 73ddcee40..2482b7311 100644 --- a/VKAPI/Handlers/Users.php +++ b/VKAPI/Handlers/Users.php @@ -125,11 +125,13 @@ public function get(string $user_ids = "0", string $fields = "", int $offset = 0 } break; case "friend_status": - switch ($usr->getSubscriptionStatus($authuser)) { + $friendStatus = $authuser ? $usr->getSubscriptionStatus($authuser) : 0; + + switch ($friendStatus) { case 3: # NOTICE falling through case 0: - $response[$i]->friend_status = $usr->getSubscriptionStatus($authuser); + $response[$i]->friend_status = $friendStatus; break; case 1: $response[$i]->friend_status = 2;