mirror of
https://github.com/openvk/openvk
synced 2025-06-06 22:47:01 +03:00
fix(photos): don't check rights of deleted album
This commit is contained in:
parent
1a03a31dfa
commit
878df31084
1 changed files with 6 additions and 1 deletions
|
@ -336,7 +336,12 @@ class Photo extends Media
|
|||
|
||||
public function getAlbum(): ?Album
|
||||
{
|
||||
return (new Albums())->getAlbumByPhotoId($this);
|
||||
$album = (new Albums())->getAlbumByPhotoId($this);
|
||||
if (!$album || $album->isDeleted()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $album;
|
||||
}
|
||||
|
||||
public function toVkApiStruct(bool $photo_sizes = true, bool $extended = false): object
|
||||
|
|
Loading…
Reference in a new issue