Latest 4.10.0 not compatible with PHP 7 because of reserved words

35 views
Skip to first unread message

Darko Hrgovic

unread,
Jul 9, 2019, 7:32:38 PM7/9/19
to htmlpurifier
This forum post says 4.8.0 is PHP 7 compatible: http://htmlpurifier.org/phorum/read.php?2,7868,7868#msg-7868

However, VarParser.php uses reserved words like "STRING" which is then used in other code.

https://www.php.net/manual/en/reserved.other-reserved-words.php

Any plans to use non-reserved words?

Thanks for your work on this library!


Edward Z. Yang

unread,
Jul 9, 2019, 10:09:31 PM7/9/19
to Darko Hrgovic, htmlpurifier
If you open a PR to fix this I will merge it. (It may take longer for
me to cut another release though.)

Excerpts from Darko Hrgovic's message of 2019-07-09 16:32:38 -0700:
Message has been deleted

Darko Hrgovic

unread,
Jul 10, 2019, 12:15:26 PM7/10/19
to htmlpurifier
Will work on this today as our need to move to PHP 7 has become urgent. 

Darko Hrgovic

unread,
Jul 10, 2019, 2:21:46 PM7/10/19
to htmlpurifier
Forked and fixed. https://repo.or.cz/htmlpurifier/darkodev.git/commit/HEAD

How to create a Pull Request in this interface? 

Patch is here if that will suffice?



Darko Hrgovic

unread,
Jul 10, 2019, 4:52:55 PM7/10/19
to htmlpurifier
So I think a PR is initiated in GitHub, but this says not to fork in GitHub: http://htmlpurifier.org/download#Git

Am I missing something?

Darko Hrgovic

unread,
Jul 10, 2019, 5:41:51 PM7/10/19
to htmlpurifier
In spite of the document at http://htmlpurifier.org/download#Git saying not to fork on GitHub, I have done so and created the PR there as I see PR activity there already. 

Maybe we can update the docs to point devs to github? 

Edward Z. Yang

unread,
Jul 10, 2019, 10:25:13 PM7/10/19
to Darko Hrgovic, htmlpurifier
Yeah, the doc is out of date. GitHub PR is fine.

Excerpts from Darko Hrgovic's message of 2019-07-10 14:41:51 -0700:
Reply all
Reply to author
Forward
0 new messages