condero / dokuwiki-toggle

Dokuwiki plugin to toggle visibility of text
https://www.dokuwiki.org/plugin:toggle
GNU General Public License v3.0
1 stars 1 forks source link

Fatal error on Igor #2

Open UlviShukurzade opened 1 year ago

UlviShukurzade commented 1 year ago
dokuwiki\Exception\FatalException: Declaration of syntax_plugin_toggle::handle($match, $state, $pos, &$handler) must be compatible with dokuwiki\Extension\SyntaxPlugin::handle($match, $state, $pos, Doku_Handler $handler)
An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the toggle plugin.

More info has been written to the DokuWiki error log.

I deleted the plugin folder under the dokuwiki/lib/plugins from our server . but it still does not work.

vicentedeandrade commented 1 year ago

I'm use PHP.81 and the latest version of DW (2023-04-04a "Jack Jackrum"). I1ve updated the lines 61 and 79 for the code above.

Line 61: public function handle($match, $state, $pos, Doku_Handler $handler) Line 79: public function render($mode, Doku_Renderer $renderer, $data)

This fixed problems for me.

sjlvanq commented 7 months ago

Right. In a simpler way, just change pass-by-reference to pass-by-value (remove the & symbol) on those lines.