Prevent "null" permissions on photos

This commit is contained in:
Michael 2020-03-12 06:20:49 +00:00
parent 88522fc832
commit 7863406080

View file

@ -298,6 +298,13 @@ class Photo
$backend_ref = $storage->put($Image->asString(), $backend_ref); $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 = [ $fields = [
"uid" => $uid, "uid" => $uid,