Problème de compatibilité PHP 7.4
Bug remonté initialement dans #398 (closed) par @dhamc :
- Valider un LD texte me renvoie une erreur :
logError http://labnbook.local/js/common.js:97
error http://labnbook.local/js/report/control.js:508
jQuery 6
validateLD http://labnbook.local/js/report/control.js:498
onclick http://labnbook.local/report/191?#:1
Erreur AJAX: Internal Server Error - HTTP 500 request: /report/191/validateLD + id_ld=2236&name=hfghfghfgh&content=%3Cp%3Ehhfghfgh%3C%2Fp%3E common.js:188:10
defaultAjaxErrorHandler http://labnbook.local/js/common.js:188
jQuery 7
validateLD http://labnbook.local/js/report/control.js:498
onclick http://labnbook.local/report/191?#:100:
Extrait de Log laravel correspondant à l'erreur 500 :
[2020-08-28 16:37:29] local.ERROR: Array and string offset access syntax with curly braces is deprecated {"userId":,"exception":"[object] (ErrorException(code: 0): Array and string offset access syntax with curly braces is deprecated at \\vendor\\ezyang\\htmlpurifier\\library\\HTMLPurifier\\TagTransform\\Font.php:78)
La ligne concernée :
if ($attr['size']{0} == '+' || $attr['size']{0} == '-') {
La bibliothèque HTMLPurifier est en version v4.10.0 pour le moment, d'après leur changelog](https://github.com/ezyang/htmlpurifier/blob/master/NEWS) il faut au moins 4.12 pour supporter php 7.4.