1
0
Fork 0

Issue 8371: More enhanced logging

This commit is contained in:
Michael 2020-03-22 12:51:37 +00:00
parent 9f8ca846eb
commit fc7ac75ba4

View file

@ -662,10 +662,9 @@ class Photo
'resource-id' => $image_rid, 'uid' => $uid
];
if (!Photo::exists($condition)) {
$condition = ['resource-id' => $image_rid];
$photo = self::selectFirst(['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'uid'], $condition);
$photo = self::selectFirst(['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'uid'], ['resource-id' => $image_rid]);
if (!DBA::isResult($photo)) {
Logger::info('Image not found', ['condition' => $condition]);
Logger::info('Image not found', ['resource-id' => $image_rid]);
} else {
Logger::info('Mismatching permissions', ['condition' => $condition, 'photo' => $photo]);
}