php-simple-html-dom-parser icon indicating copy to clipboard operation
php-simple-html-dom-parser copied to clipboard

Escaping regular expression to work with php-7.*

Open sptutusukanta opened this issue 5 years ago • 2 comments

Due to the breaking change the regular expressions don't work anymore. Also, since PHP 7.1 it is possible to interpret negative offset.

Check: https://stackoverflow.com/questions/24764212/preg-match-compilation-failed-invalid-range-in-character-class-at-offset https://stackoverflow.com/questions/47214416/dont-parse-simple-html-dom-on-php-7-1 https://sourceforge.net/p/simplehtmldom/bugs/161/

This commit fixes those issues. [Tested with php-7.4]

sptutusukanta avatar Jan 26 '20 19:01 sptutusukanta

I came across this problem too and it seems all the changes @sptutusukanta applied are correct. These changes make the package compatible with PHP 7.*. When is this pull request going to be merged to master and make a release?

SaliBhdr avatar Feb 12 '20 05:02 SaliBhdr

Hello @SaliBhdr, it seems like this repo is no more maintained by anyone & abandoned. So, I already found another package which is still maintained and is quite a drop-in replacement of this package.

Check this out: https://github.com/Kub-AT/php-simple-html-dom-parser You may install it with:

composer require kub-at/php-simple-html-dom-parser

sptutusukanta avatar Feb 12 '20 05:02 sptutusukanta