diff --git a/VKAPI/Handlers/Friends.php b/VKAPI/Handlers/Friends.php index f78735209..56de32949 100644 --- a/VKAPI/Handlers/Friends.php +++ b/VKAPI/Handlers/Friends.php @@ -13,6 +13,10 @@ function get(int $user_id, string $fields = "", int $offset = 0, int $count = 10 $users = new UsersRepo; $this->requireUser(); + + if (is_null($users->get($user_id))) { + $this->fail(100, "One of the parameters specified was missing or invalid"); + } foreach($users->get($user_id)->getFriends($offset, $count) as $friend) { $friends[$i] = $friend->getId();