ssahara / dw-plugin-toctweak

Implement different mechanism for table of contents (TOC)
https://www.dokuwiki.org/plugin:toctweak
1 stars 3 forks source link

PHP parse error #8

Open itsnotv opened 6 years ago

itsnotv commented 6 years ago

New version (https://github.com/ssahara/dw-plugin-toctweak/archive/2018-01-08.zip) breaks dokuwiki.

PHP message: PHP Parse error: syntax error, unexpected '.', expecting ',' or ';' in /usr/share/nginx/www/wiki/lib/plugins/toctweak/action/rendertoc.php on line 17

ssahara commented 6 years ago

The PHP error likely happened constant expression which supported in PHP 5.6.0.

const TOC_HERE = '<!-- TOC_HERE -->'.DOKU_LF;

Could you check your PHP version > 5.6? Current DokuWIki requires PHP version 5.6 or later, https://www.dokuwiki.org/requirements

itsnotv commented 6 years ago

@ssahara I was on php 5.4, upgrading to 7.0 fixed this error.

Thanks