1
1
Fork 0

Merge pull request #7945 from MrPetovan/bug/fatal-errors

Return early if user.uid isn't present in ACL::getFullSelectorHTML
This commit is contained in:
Philipp 2019-12-13 20:28:34 +01:00 committed by GitHub
commit 8f58d2d84e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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'));