compatibility fixxxxxx

This commit is contained in:
veselcraft 2023-11-13 12:37:15 +03:00
parent 626b5b49bb
commit d183b1a8a3
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA
2 changed files with 6 additions and 2 deletions

View file

@ -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");
}

View file

@ -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(),