Merge pull request #7202 from MrPetovan/bug/fatal-errors
Prevent fatal error in ACL::getFullSelectorHTML when accessing a profile as a remote visitor
This commit is contained in:
commit
dc0978141c
1 changed files with 2 additions and 2 deletions
|
@ -259,7 +259,7 @@ class ACL extends BaseObject
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||||
*/
|
*/
|
||||||
public static function getFullSelectorHTML(array $user, $show_jotnets = false, array $default_permissions = [])
|
public static function getFullSelectorHTML(array $user = null, $show_jotnets = false, array $default_permissions = [])
|
||||||
{
|
{
|
||||||
// Defaults user permissions
|
// Defaults user permissions
|
||||||
if (empty($default_permissions)) {
|
if (empty($default_permissions)) {
|
||||||
|
@ -314,7 +314,7 @@ class ACL extends BaseObject
|
||||||
'$aclModalTitle' => L10n::t('Permissions'),
|
'$aclModalTitle' => L10n::t('Permissions'),
|
||||||
'$aclModalDismiss' => L10n::t('Close'),
|
'$aclModalDismiss' => L10n::t('Close'),
|
||||||
'$features' => [
|
'$features' => [
|
||||||
'aclautomention' => Feature::isEnabled($user['uid'], 'aclautomention') ? 'true' : 'false'
|
'aclautomention' => !empty($user['uid']) && Feature::isEnabled($user['uid'], 'aclautomention') ? 'true' : 'false'
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue