tormec / AcMenu

DokuWiki plugin which provides an accordion menu for namespaces and relative pages.
https://www.dokuwiki.org/plugin:acmenu
1 stars 3 forks source link

Warning: Trying to access array offset on value of type null #11

Closed eduardomozart closed 1 year ago

eduardomozart commented 1 year ago

Hello, The following error is shown at the page header when editing the sidebar namespace with the Argon template (the only content of the page is the AcMenu itself):

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/acmenu/syntax.php on line 121

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/acmenu/syntax.php on line 122

Warning: Cannot modify header information - headers already sent by (output started at /home/robertinho/public_html/wiki/lib/plugins/acmenu/syntax.php:121) in /home/robertinho/public_html/wiki/inc/actions.php on line 38
tormec commented 1 year ago

Hi, I've tested AcMenu plugin on the Argon template, on a new installation of DokuWiki (Release 2022-07-31a "Igor") with PHP Version 8.0.25.

I can edit the sidebar page without any warning (see screenshot). If you could give me more details so I can reproduce the issue, I will willingly take a look at it.

acmenu_aragon

eduardomozart commented 1 year ago

Hello, Most of the time I see this error happening was because there was PHP variables usage without using "isset" first to check if it's declared, so it triggers these warnings. I have the display_errors PHP directive set to "On". I'm using PHP 8.1 and have the following content at my sidebar file:

image

tormec commented 1 year ago

It should work now. Thanks