From: Michael Date: Thu, 12 Mar 2020 06:20:49 +0000 (+0000) Subject: Prevent "null" permissions on photos X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7863406080bf4ea1ca73d6ffd49aac315b447b31;p=friendica.git Prevent "null" permissions on photos --- diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 67c4fa2ea3..fa3ffe81b3 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -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,