Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access array offset on value of type null #256

Closed
dregad opened this issue Sep 25, 2023 · 2 comments · Fixed by #275
Closed

access array offset on value of type null #256

dregad opened this issue Sep 25, 2023 · 2 comments · Fixed by #275

Comments

@dregad
Copy link

dregad commented Sep 25, 2023

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 0af31bb (#246)

@nicola-myo
Copy link

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

dregad added a commit to dregad/dokuwiki-plugin-move that referenced this issue Apr 26, 2024
Warning: Trying to access array offset on value of type null in
./dokuwiki/move/action/rename.php on line 42

$USERINFO is null when user is not logged in.

Regression introduced by 0af31bb (michitux#246).

Fixes michitux#256, michitux#255
@dregad
Copy link
Author

dregad commented Apr 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants