dokuwiki
dokuwiki copied to clipboard
lesserphp/lessc.inc.php uses curly brace array/string access syntax which is not supported anymore in PHP8
I upgraded to PHP8 today and the Dokuwiki stylesheet broke. I saw that this is caused because lib/exe/css.php seems to include vendor/marcusschwarz/lesserphp/lessc.inc.php which uses the now unsupported curly brace syntax to access array/string indexes: line 761, 2762 and 2816. I could just change the syntax there to use brackets instead of curly braces which fixed the issue for me.
I know, this is not caused by Dokuwiki itself but Dokuwiki is affected so I thought I should leave you a note here. If this is not an issue anymore, please just close this issue. If this is not yet resolved, I guess you know better how to resolve it than I do.
Edit: This seems to be related to https://github.com/splitbrain/dokuwiki/issues/3398
It breaks also 7.4 test but yeah.
Stacktrace:
Array and string offset access syntax with curly braces is deprecated
vendor/marcusschwarz/lesserphp/lessc.inc.php:761
lib/exe/css.php:199
lib/exe/css.php:17
Same problem that cost me a lot of time.
Version of PHP: php-fpm 8.1.4-1 Version of dokuwiki: 20200729-3
I replaced the {0} by [0] at lines 761, 2762, 2816, and it fixed the problem.