]> git.mxchange.org Git - friendica.git/commitdiff
Prevent fatal error in ACL::getFullSelectorHTML when accessing a profile as a remote...
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 29 May 2019 01:08:48 +0000 (21:08 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 29 May 2019 01:09:06 +0000 (21:09 -0400)
See https://github.com/friendica/friendica/issues/6916#issuecomment-495724811

src/Core/ACL.php

index e6c82fd4bfdfb2b45a9ac41abaf97e27ef4a37a4..ec31ddb7cdc965803add2692a8b182d1a74ed57a 100644 (file)
@@ -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'
                        ],
                ]);