mirror of
https://github.com/openvk/openvk
synced 2025-07-04 23:09:54 +03:00
fix(photos): don't check rights of deleted album
This commit is contained in:
parent
12926f317d
commit
b97783f144
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