From 5414d51d4cde2b18dffa1c8ec922d9e2c1371132 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 28 May 2019 21:08:48 -0400 Subject: [PATCH] Prevent fatal error in ACL::getFullSelectorHTML when accessing a profile as a remote visitor See https://github.com/friendica/friendica/issues/6916#issuecomment-495724811 --- src/Core/ACL.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/ACL.php b/src/Core/ACL.php index e6c82fd4b..ec31ddb7c 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -259,7 +259,7 @@ class ACL extends BaseObject * @return string * @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 if (empty($default_permissions)) { @@ -314,7 +314,7 @@ class ACL extends BaseObject '$aclModalTitle' => L10n::t('Permissions'), '$aclModalDismiss' => L10n::t('Close'), '$features' => [ - 'aclautomention' => Feature::isEnabled($user['uid'], 'aclautomention') ? 'true' : 'false' + 'aclautomention' => !empty($user['uid']) && Feature::isEnabled($user['uid'], 'aclautomention') ? 'true' : 'false' ], ]);