check return value of PermissionLimits::Get() - in case it's false.

This commit is contained in:
zotlabs 2020-06-09 16:33:50 -07:00
parent 81c3b2d635
commit 72d4af28c1

View file

@ -276,6 +276,9 @@ function perm_is_allowed($uid, $observer_xchan, $permission, $check_siteblock =
// First find out what the channel owner declared permissions to be.
$channel_perm = PermissionLimits::Get($uid,$permission);
if ($channel_perm === false) {
return false;
}
$r = q("select channel_pageflags, channel_moved, channel_hash from channel where channel_id = %d limit 1",
intval($uid)