dokuwiki icon indicating copy to clipboard operation
dokuwiki copied to clipboard

lesserphp/lessc.inc.php uses curly brace array/string access syntax which is not supported anymore in PHP8

Open DrTobe opened this issue 4 years ago • 3 comments

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

DrTobe avatar Feb 01 '21 09:02 DrTobe

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

gerardnico avatar Sep 02 '21 13:09 gerardnico

It would be great to get also a:

convertDeprecationsToExceptions=false

in phpunit

gerardnico avatar Sep 02 '21 14:09 gerardnico

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.

blueglyph avatar May 08 '22 13:05 blueglyph