turnermm / nodisp

Prevents marked off text from being sent from server to browser
https://www.dokuwiki.org/plugin:nodisp
1 stars 2 forks source link

Undefined array warnings if user not logged in #13

Open adamlive opened 2 months ago

adamlive commented 2 months ago

Thanks for the plugin! Part of my wiki is public (not logged in at all) and I was getting warnings from this plug-in that looks to be an easy fix.

In action.php, around line 96, it tries to read userinfo before checking if empty, which works but throws a warning. If I can suggest:

            if (empty($INFO['userinfo']['grps'])) {
                return "256";
            }
            $user_groups = $INFO['userinfo']['grps'];

Looks like syntax/basic.php has a nearly identical getLevel function with the same problem (and solution)

turnermm commented 2 months ago

I'm no longer active. Think about adopting the plugin and updating. Or if you are not comfortable doing that, post to the DokuWiki forum for help.