]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8371: More enhanced logging
authorMichael <heluecht@pirati.ca>
Sun, 22 Mar 2020 12:51:37 +0000 (12:51 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 22 Mar 2020 12:51:37 +0000 (12:51 +0000)
src/Model/Photo.php

index b5d1ea894265c7c9abd0adf151ab4ad11c650e90..45a8a92e1993ee1aa7caa6769ff2e33e26c4d9ce 100644 (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]);
                                }