mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +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
|
@ -14,6 +14,10 @@ final class Friends extends VKAPIRequestHandler
|
||||||
|
|
||||||
$this->requireUser();
|
$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) {
|
foreach($users->get($user_id)->getFriends($offset, $count) as $friend) {
|
||||||
$friends[$i] = $friend->getId();
|
$friends[$i] = $friend->getId();
|
||||||
$i++;
|
$i++;
|
||||||
|
|
Loading…
Reference in a new issue