mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +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;
|
||||
|
||||
$array = [];
|
||||
$find = $users->find($q);
|
||||
|
||||
foreach ($users->find($q) as $user) {
|
||||
foreach ($find as $user) {
|
||||
$array[] = $user->getId();
|
||||
}
|
||||
|
||||
return (object)[
|
||||
"count" => $users->getFoundCount($q),
|
||||
"count" => $find->size(),
|
||||
"items" => $this->get(implode(',', $array), $fields, $offset, $count)
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue