diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index a87b1e63..9aa8ad37 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -162,7 +162,7 @@ final class Wall extends VKAPIRequestHandler $attachments[] = [ "type" => "photo", "photo" => [ - "album_id" => $attachment->getAlbum()->getId(), + "album_id" => $attachment->getAlbum() ? $attachment->getAlbum()->getId() : null, "date" => $attachment->getPublicationTime()->timestamp(), "id" => $attachment->getVirtualId(), "owner_id" => $attachment->getOwner()->getId(),