turnermm / epub

Dokuwiki plugin for creating ebooks
http://www.dokuwiki.org/plugin:epub
15 stars 9 forks source link

"Warning: Trying to access array offset on value of type null" when migrating to PHP 8.1 #37

Closed eduardomozart closed 1 year ago

eduardomozart commented 1 year ago

Hello,

I upgraded my DokuWiki instance to PHP 8.1 (PHP 7.4 is deprecated now) and the following errors are being shown at the top of my Wiki:

Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/epub/action.php on line 104

Warning: Cannot modify header information - headers already sent by (output started at /home/robertinho/public_html/wiki/lib/plugins/dw2pdf/action.php:914) in /home/robertinho/public_html/wiki/inc/actions.php on line 38

Disabling the plug-in fixes the issue.

Please let me know if there's any information I can provide to troubleshoot and fix this issue.

turnermm commented 1 year ago

See if this solves the problem. I can't really test since I am not yet running php 8

eduardomozart commented 1 year ago

Applying your fix seems to dismiss the warning. Thank you!