ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.06k stars 325 forks source link

PHP 5.3 Build Failing in v4.9.1 #128

Closed mattsimpson closed 7 years ago

mattsimpson commented 7 years ago

Hello,

The composer.json file in v4.9.1 indicates "php": ">=5.2", but empty($config->get('Core.HiddenElements')["script"]))) { in HTMLPurifier/Lexer.php doesn't work with PHP 5.3. This is causing a build in Travis-CI to fail.

..PHP Parse error:  syntax error, unexpected '[', expecting ')' in /home/travis/build/EntradaProject/entrada-1x-me/www-root/core/library/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php on line 353

Thanks very much for the amazing library. From one open source project to another.

Sincerely, -Matt Simpson

ezyang commented 7 years ago

Hi @mattsimpson, this is fixed in trunk. Is there a way to "hotpatch" composer.json or do I have to do another release?

mattsimpson commented 7 years ago

I'm not entirely sure to be honest @ezyang. You might be able to delete the existing 4.9.1 tag and re issue it, but you might be better off just tagging it as 4.9.2 and doing another release. Thanks so much for issuing a fix. Amazing. Matt

ezyang commented 7 years ago

Released 4.9.2