diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 34fd37a9d..dd6fe5289 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -662,6 +662,13 @@ class Photo 'resource-id' => $image_rid, 'uid' => $uid ]; if (!Photo::exists($condition)) { + $condition = ['resource-id' => $image_rid]; + $photo = Photo::selectFirst(['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'uid'], $condition); + if (!DBA::isResult($photo)) { + Logger::info('Image not found', ['condition' => $condition]); + } else { + Logger::info('Mismatching permissions', ['condition' => $condition, 'photo' => $photo]); + } continue; }