Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.4 #84

Open
Quadratica opened this issue Oct 7, 2020 · 6 comments
Open

PHP 7.4 #84

Quadratica opened this issue Oct 7, 2020 · 6 comments

Comments

@Quadratica
Copy link

Quadratica commented Oct 7, 2020

Does the library work with PHP 7.4 ? Cause i get some error, in the past i already used the Php Simple Html Parser and everything was all right.

@malsatin
Copy link

malsatin commented Dec 7, 2020

Hi there.
Getting exception preg_match(): Compilation failed: invalid range in character class at offset 4 on php 7.4.
Anyone else got that?

@mce1978
Copy link

mce1978 commented Jan 7, 2021

Same here, it doesn't work! Found out that this project is abandoned. Use this fork instead.

Kub-AT/php-simple-html-dom-parser

@Quadratica
Copy link
Author

Thank you

@prayal1711
Copy link

Just a \ needs to be added before all the hyphens in the regex defined in file simple_html_dom.php ( 2 lines to be specific )

@GitIDHere
Copy link

GitIDHere commented Jul 14, 2021

The fix has yet to be implemented into the repo. Had to manually edit the source scrip to get rid of the error. Don't think this fix will get added in as the repo hasn't been updated in years....

Had to add a \ infront of all the - hyphens on here:

$pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";

if (!preg_match("/^[\w-:]+$/", $tag))

@minhvuong0505
Copy link

Thanh you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants