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

Maybe fix issue 4? #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

fiwswe
Copy link

@fiwswe fiwswe commented Feb 11, 2023

Disclaimer: I do not use this plugin! It has only come to my attention because of the attempts by @rardcode to file an understandable issue in the correct place.

That said, the issue described in #4 (and previously in #3, linuxserver/docker-dokuwiki#58 and dokuwiki/dokuwiki#3840) seems to be caused by an excessive number of PHP warnings which in turn are triggered in

if ( $data[1] == DOKU_LEXER_UNMATCHED ) {
because apparently $data is null in some cases.

I do not have enough experience with the DokuWiki plugin API to really tell but I think this might be caused by the handle() method not always having a defined return value. This is just a guess though. This PR attempts to fix the results of this by checking $data before use in the render() method.

The same thing seems to be happening in

if ( $data[1] == DOKU_LEXER_UNMATCHED ) {
so I applied the same fix there.

Please note that this is completely untested. So please check whether this works before merging or implement a better fix if possible.

HTH
fiwswe

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 this pull request may close these issues.

1 participant