mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
VKAPI: Fix error 500 on Users.search method
This commit is contained in:
parent
f505887d7f
commit
c3ebcabda3
1 changed files with 3 additions and 2 deletions
|
@ -158,13 +158,14 @@ final class Users extends VKAPIRequestHandler
|
||||||
$users = new UsersRepo;
|
$users = new UsersRepo;
|
||||||
|
|
||||||
$array = [];
|
$array = [];
|
||||||
|
$find = $users->find($q);
|
||||||
|
|
||||||
foreach ($users->find($q) as $user) {
|
foreach ($find as $user) {
|
||||||
$array[] = $user->getId();
|
$array[] = $user->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (object)[
|
return (object)[
|
||||||
"count" => $users->getFoundCount($q),
|
"count" => $find->size(),
|
||||||
"items" => $this->get(implode(',', $array), $fields, $offset, $count)
|
"items" => $this->get(implode(',', $array), $fields, $offset, $count)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue