From 4cf50790b132ef0ccf58abb01f7b0896ea0f630b Mon Sep 17 00:00:00 2001 From: veselcraft Date: Fri, 25 Mar 2022 14:46:40 +0300 Subject: [PATCH] that's why i need to refactor this --- VKAPI/Handlers/Wall.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(),