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

Undefined array key "id" in approve/action/revisions.php #54

Open
megatron-uk opened this issue Nov 28, 2024 · 0 comments
Open

Undefined array key "id" in approve/action/revisions.php #54

megatron-uk opened this issue Nov 28, 2024 · 0 comments

Comments

@megatron-uk
Copy link

megatron-uk commented Nov 28, 2024

With the latest dokuwiki-plugin-approve and Dokuwiki 2024-02-06b, I get these warnings in the apache error log when viewing the revision history of uploaded media in media manager:

PHP Warning: Undefined array key "id" in /www/dokuwiki/live/dokuwiki-2024-02-06b/lib/plugins/approve/action/revisions.php on line 23,

This refers to the following test in revisions.php:

if (!$acl->useApproveHere($INFO['id'])) return;

Directly above this line I have added the following:

if (array_key_exists("id", $INFO) == False) {
   return;
}

This seems to fix the issue when objects don't have an 'id' key. Advice from other users whether this is an appropriate fix is welcome.

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

No branches or pull requests

1 participant