dokufreaks / plugin-include

A DokuWiki plugin for including other wiki pages into the current one.
http://www.dokuwiki.org/plugin:include
GNU General Public License v2.0
62 stars 54 forks source link

Errors on PHP 8.1, Dokuwiki 2023-04-04a "Jack Jackrum" #298

Open Miro-Collas opened 1 year ago

Miro-Collas commented 1 year ago
2023-08-14 22:05:50E_WARNING: Undefined array key 0/home/fswiki/public_html/lib/plugins/include/action.php(285)
    #0 /home/fswiki/public_html/lib/plugins/include/action.php(285): dokuwiki\ErrorHandler::errorHandler(2, 'Undefined array...', '/home/fswiki/pu...', 285)
    #1 /home/fswiki/public_html/inc/Extension/EventHandler.php(80): action_plugin_include->handle_secedit_button(Object(dokuwiki\Extension\Event), NULL)
    #2 /home/fswiki/public_html/inc/Extension/Event.php(74): dokuwiki\Extension\EventHandler->process_event(Object(dokuwiki\Extension\Event), 'BEFORE')
    #3 /home/fswiki/public_html/inc/Extension/Event.php(132): dokuwiki\Extension\Event->advise_before(true)
    #4 /home/fswiki/public_html/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger('html_secedit_ge...', true)
    #5 /home/fswiki/public_html/inc/html.php(119): dokuwiki\Extension\Event::createAndTrigger('HTML_SECEDIT_BU...', Array, 'html_secedit_ge...')
    #6 [internal function]: html_secedit_button(Array)
    #7 /home/fswiki/public_html/inc/html.php(94): preg_replace_callback('#<!-- EDIT({.*?...', 'html_secedit_bu...', '\n\n<div class="t...')
    #8 /home/fswiki/public_html/inc/Ui/PageView.php(69): html_secedit('\n\n<div class="t...', true)
    #9 /home/fswiki/public_html/inc/Action/Show.php(37): dokuwiki\Ui\PageView->show()
    #10 /home/fswiki/public_html/inc/template.php(100): dokuwiki\Action\Show->tplContent()
    #11 [internal function]: tpl_content_core('show')
    #12 /home/fswiki/public_html/inc/Extension/Event.php(133): call_user_func_array('tpl_content_cor...', Array)
    #13 /home/fswiki/public_html/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger('tpl_content_cor...', true)
    #14 /home/fswiki/public_html/inc/template.php(85): dokuwiki\Extension\Event::createAndTrigger('TPL_ACT_RENDER', 'show', 'tpl_content_cor...')
    #15 /home/fswiki/public_html/lib/tpl/bootstrap3/main.php(117): tpl_content(false)
    #16 /home/fswiki/public_html/inc/actions.php(27): include('/home/fswiki/pu...')
    #17 /home/fswiki/public_html/doku.php(126): act_dispatch()
    #18 {main}

2023-08-14 22:05:50E_WARNING: Trying to access array offset on value of type null/home/fswiki/public_html/lib/plugins/include/action.php(285)
    #0 /home/fswiki/public_html/lib/plugins/include/action.php(285): dokuwiki\ErrorHandler::errorHandler(2, 'Trying to acces...', '/home/fswiki/pu...', 285)
    #1 /home/fswiki/public_html/inc/Extension/EventHandler.php(80): action_plugin_include->handle_secedit_button(Object(dokuwiki\Extension\Event), NULL)
    #2 /home/fswiki/public_html/inc/Extension/Event.php(74): dokuwiki\Extension\EventHandler->process_event(Object(dokuwiki\Extension\Event), 'BEFORE')
    #3 /home/fswiki/public_html/inc/Extension/Event.php(132): dokuwiki\Extension\Event->advise_before(true)
    #4 /home/fswiki/public_html/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger('html_secedit_ge...', true)
    #5 /home/fswiki/public_html/inc/html.php(119): dokuwiki\Extension\Event::createAndTrigger('HTML_SECEDIT_BU...', Array, 'html_secedit_ge...')
    #6 [internal function]: html_secedit_button(Array)
    #7 /home/fswiki/public_html/inc/html.php(94): preg_replace_callback('#<!-- EDIT({.*?...', 'html_secedit_bu...', '\n\n<div class="t...')
    #8 /home/fswiki/public_html/inc/Ui/PageView.php(69): html_secedit('\n\n<div class="t...', true)
    #9 /home/fswiki/public_html/inc/Action/Show.php(37): dokuwiki\Ui\PageView->show()
    #10 /home/fswiki/public_html/inc/template.php(100): dokuwiki\Action\Show->tplContent()
    #11 [internal function]: tpl_content_core('show')
    #12 /home/fswiki/public_html/inc/Extension/Event.php(133): call_user_func_array('tpl_content_cor...', Array)
    #13 /home/fswiki/public_html/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger('tpl_content_cor...', true)
    #14 /home/fswiki/public_html/inc/template.php(85): dokuwiki\Extension\Event::createAndTrigger('TPL_ACT_RENDER', 'show', 'tpl_content_cor...')
    #15 /home/fswiki/public_html/lib/tpl/bootstrap3/main.php(117): tpl_content(false)
    #16 /home/fswiki/public_html/inc/actions.php(27): include('/home/fswiki/pu...')
    #17 /home/fswiki/public_html/doku.php(126): act_dispatch()
    #18 {main} 
Miro-Collas commented 1 year ago

I have closed my PR as it evidently contains a bug which I don't know how to resolve. I am keeping my fork as my changes work for our wiki; we have no situation that triggers the bug.