]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8371: Enhanced logging for picture problem
authorMichael <heluecht@pirati.ca>
Sun, 22 Mar 2020 09:57:46 +0000 (09:57 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 22 Mar 2020 09:57:46 +0000 (09:57 +0000)
src/Model/Photo.php

index 34fd37a9de52bf0cdcd6f21f41bbbb25ea56767a..dd6fe52899be41633b49abc47212194c75d9a069 100644 (file)
@@ -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;
                        }