michitux / dokuwiki-plugin-move

Move and rename pages and namespaces whilst maintaining the links
http://www.dokuwiki.org/plugin:move
GNU General Public License v2.0
40 stars 20 forks source link

access array offset on value of type null #256

Closed dregad closed 5 months ago

dregad commented 1 year ago

Viewing any page when not authenticated (guest / anonymous) triggers

Warning: Trying to access array offset on value of type null in./dokuwiki/move/action/rename.php on line 42

$INPUT->server->str('REMOTE_USER') is not set when not authenticated...

Regression introduced by 0af31bb63abd3731e904efc2ed90dd3ce33f4e52 (#246)

nicola-myo commented 8 months ago

It can be resolved checking the null value of the array $USERINFO adding before the line 42: if (!is_null($USERINFO)) ...

dregad commented 5 months ago

I just submitted PR #275 to fix this annoying warning, @michitux hopefully you can merge it soon ?