]> git.mxchange.org Git - friendica.git/commitdiff
Return early if user.uid isn't present in ACL::getFullSelectorHTML
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 13 Dec 2019 18:29:06 +0000 (13:29 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 13 Dec 2019 18:29:18 +0000 (13:29 -0500)
- Addresses https://github.com/friendica/friendica/issues/7675#issuecomment-565533824

src/Core/ACL.php

index 83fae423ac920aeb6aa6113fad96dcaf35e7e420..64e03d47190e752902d99351fbf191ba3ab789ac 100644 (file)
@@ -335,6 +335,10 @@ class ACL extends BaseObject
         */
        public static function getFullSelectorHTML(Page $page, array $user = null, bool $for_federation = false, array $default_permissions = [])
        {
+               if (empty($user['uid'])) {
+                       return '';
+               }
+
                $page->registerFooterScript(Theme::getPathForFile('asset/typeahead.js/dist/typeahead.bundle.js'));
                $page->registerFooterScript(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.js'));
                $page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.css'));