mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
VKAPI: Change Friends.get behaviour if user not found
This commit is contained in:
parent
cd7b51fcf6
commit
15a5f172d9
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,10 @@ final class Friends extends VKAPIRequestHandler
|
|||
$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();
|
||||
|
|
Loading…
Reference in a new issue