]> git.mxchange.org Git - friendica.git/commitdiff
Prevent "null" permissions on photos
authorMichael <heluecht@pirati.ca>
Thu, 12 Mar 2020 06:20:49 +0000 (06:20 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 12 Mar 2020 06:20:49 +0000 (06:20 +0000)
src/Model/Photo.php

index 67c4fa2ea390ca563a19b67cc4de54f95d5f772b..fa3ffe81b368bda326a22f3f83b8bda18cfcb490 100644 (file)
@@ -298,6 +298,13 @@ class Photo
                        $backend_ref = $storage->put($Image->asString(), $backend_ref);
                }
 
+               // Prevent "null" permissions
+               if (!empty($uid)) {
+                       $allow_cid = $allow_cid ?? '<' . $uid . '>';
+                       $allow_gid = $allow_gid ?? '';
+                       $deny_cid = $deny_cid ?? '';
+                       $deny_gid = $deny_gid ?? '';
+               }
 
                $fields = [
                        "uid" => $uid,