From: Michael Date: Sun, 22 Mar 2020 12:51:37 +0000 (+0000) Subject: Issue 8371: More enhanced logging X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fc7ac75ba4418eab6f0da8c0fcb8359d82f2b0c6;p=friendica.git Issue 8371: More enhanced logging --- diff --git a/src/Model/Photo.php b/src/Model/Photo.php index b5d1ea8942..45a8a92e19 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -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]); }