mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
compatibility fixxxxxx
This commit is contained in:
parent
626b5b49bb
commit
d183b1a8a3
2 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,7 @@ use openvk\Web\Models\Repositories\Users as UsersRepo;
|
|||
|
||||
final class Friends extends VKAPIRequestHandler
|
||||
{
|
||||
function get(int $user_id, string $fields = "", int $offset = 0, int $count = 100): object
|
||||
function get(int $user_id = 0, string $fields = "", int $offset = 0, int $count = 100): object
|
||||
{
|
||||
$i = 0;
|
||||
$offset++;
|
||||
|
@ -14,6 +14,10 @@ final class Friends extends VKAPIRequestHandler
|
|||
|
||||
$this->requireUser();
|
||||
|
||||
if ($user_id == 0) {
|
||||
$user_id = $this->getUser()->getId();
|
||||
}
|
||||
|
||||
if (is_null($users->get($user_id))) {
|
||||
$this->fail(100, "One of the parameters specified was missing or invalid");
|
||||
}
|
||||
|
|
|
@ -802,7 +802,7 @@ final class Wall extends VKAPIRequestHandler
|
|||
return [
|
||||
"type" => "photo",
|
||||
"photo" => [
|
||||
"album_id" => $attachment->getAlbum() ? $attachment->getAlbum()->getId() : NULL,
|
||||
"album_id" => $attachment->getAlbum() ? $attachment->getAlbum()->getId() : 0,
|
||||
"date" => $attachment->getPublicationTime()->timestamp(),
|
||||
"id" => $attachment->getVirtualId(),
|
||||
"owner_id" => $attachment->getOwner()->getId(),
|
||||
|
|
Loading…
Reference in a new issue