diff --git a/src/PhotosApi.php b/src/PhotosApi.php index 0e472c9..916d872 100644 --- a/src/PhotosApi.php +++ b/src/PhotosApi.php @@ -474,7 +474,8 @@ public function getSets($photoIds, $userId = null) } foreach ($sets['photoset'] as $photoset) { foreach ($photoIds as $photoId) { - if (in_array($photoId, $photoset['has_requested_photos'])) { + // has_requested_photos is only set if the user owns the photo. + if (in_array($photoId, $photoset['has_requested_photos'] ?? [])) { $out[] = $photoset; } }