Escaping regular expression to work with php-7.*#79
Open
sptutusukanta wants to merge 1 commit intosunra:masterfrom
Open
Escaping regular expression to work with php-7.*#79sptutusukanta wants to merge 1 commit intosunra:masterfrom
sptutusukanta wants to merge 1 commit intosunra:masterfrom
Conversation
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]
|
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? |
Author
|
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 composer require kub-at/php-simple-html-dom-parser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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]