dokufreaks / plugin-charter

The Dokuwiki Charter Plugin provides a syntax for drawing highly customizable charts using the pChart library.
http://foosel.org/snippets/dokuwiki/charter
GNU General Public License v2.0
1 stars 0 forks source link

PHP7/Hogfather compatibility #1

Open einhirn opened 4 years ago

einhirn commented 4 years ago

This plugin is not compatible to Hogfather because it uses incompatible method signatures...

ghost commented 4 years ago

I just noticed that this also affects me. :cry: When I try to open a Wiki page that uses the plugin, the page doesn't load at all and I get the following errors:

[08-Nov-2020 19:58:08 Europe/Lisbon] PHP Warning:  Illegal string offset 'Position' in /home4/diffrac3/public_html/wiki/lib/plugins/charter/lib/pchart/pData.class.php on line 57
[08-Nov-2020 19:58:08 Europe/Lisbon] PHP Warning:  Illegal string offset 'Format' in /home4/diffrac3/public_html/wiki/lib/plugins/charter/lib/pchart/pData.class.php on line 58
[08-Nov-2020 19:58:08 Europe/Lisbon] PHP Fatal error:  Uncaught Error: Cannot use string offset as an array in /home4/diffrac3/public_html/wiki/lib/plugins/charter/lib/pchart/pData.class.php:58
Stack trace:
#0 /home4/diffrac3/public_html/wiki/lib/plugins/charter/helper.php(360): pData->pData()
#1 /home4/diffrac3/public_html/wiki/lib/plugins/charter/helper.php(319): helper_plugin_charter->_createGraphData(Array)
#2 /home4/diffrac3/public_html/wiki/lib/plugins/charter/syntax.php(82): helper_plugin_charter->render('/home4/diffrac3...')
#3 /home4/diffrac3/public_html/wiki/inc/parser/handler.php(279): syntax_plugin_charter->handle('<charter>\ntype ...', 5, 1749, Object(Doku_Handler))
#4 /home4/diffrac3/public_html/wiki/inc/Parsing/Lexer/Lexer.php(270): Doku_Handler->plugin('<charter>\ntype ...', 5, 1749, 'charter')
#5 /home4/diffrac3/public_html/wiki/inc/Parsing/Lexer/Lexer.php(197): dokuwiki\Parsing\Lexer\Lexer->invokeHandler('<charter>\ntype ...', 5, 1749)
#6 /home4/diffrac3/public_html/wiki/inc/Parsing/Lexer/Lexer.php(147): dokuwiki\Parsing\Lexer\Lexer->dispatchTok in /home4/diffrac3/public_html/wiki/lib/plugins/charter/lib/pchart/pData.class.php on line 58

Are there any plans to update the plugin? Or maybe we can contribute to fix it?

ghost commented 4 years ago

After looking a bit deeper into this, I realize that perhaps the issue I was running into is not the same as the one reported by @einhirn.

I was able to fix my error by applying the patch in https://github.com/dokufreaks/plugin-charter/pull/2.