Update Photos.php

This commit is contained in:
mrilyew 2025-04-03 21:47:37 +03:00
parent e4983df532
commit 59513bf2e2

View file

@ -285,7 +285,7 @@ final class Photos extends VKAPIRequestHandler
$this->fail(15, "Access denied");
}
if (!is_null($title) && !empty($title) && !ctype_space($content)) {
if (!is_null($title) && !empty($title) && !ctype_space($title)) {
$album->setName($title);
}
if (!is_null($description)) {
@ -336,8 +336,9 @@ final class Photos extends VKAPIRequestHandler
$album_ids = explode(',', $album_ids);
foreach ($album_ids as $album_id) {
$album = (new Albums())->getAlbumByOwnerAndId((int) $owner_id, (int) $album_id);
if (!$album || $album->isDeleted() || !$album->canBeViewedBy($this->getUser()))
if (!$album || $album->isDeleted() || !$album->canBeViewedBy($this->getUser())) {
continue;
}
$albums_list[] = $album;
}