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

Not compatible with php 7.3 #64

Open
vistart opened this issue Dec 13, 2018 · 10 comments

Comments

Projects
None yet
7 participants
@vistart
Copy link

commented Dec 13, 2018

PHP Warning 'yii\base\ErrorException' with message 'preg_match(): Compilation failed: invalid range in character class at offset 4'

in .../sunra/php-simple-html-dom-parser/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php:1378

https://github.com/sunra/php-simple-html-dom-parser/blob/master/Src/Sunra/PhpSimple/simplehtmldom_1_5/simple_html_dom.php#L1378

@oza75

This comment has been minimized.

Copy link

commented Dec 15, 2018

I got the same error

@wotupset

This comment has been minimized.

Copy link

commented Dec 16, 2018

php 7.3 has some bugs in preg_* function

@ArniPL

This comment has been minimized.

Copy link

commented Dec 17, 2018

@wotupset Not bugs. PHP 7.3 has updated its regular expression engine to PCRE2, which brings some breaking changes.

I think the dash in referenced expression needs to be escaped.

More: http://php.net/manual/en/migration73.other-changes.php#migration73.other-changes.pcre

@ArniPL

This comment has been minimized.

Copy link

commented Dec 17, 2018

There's even a PR opened two months ago that fixes this: #63 but it's left unmerged. This package might be abandoned.

@Kub-AT

This comment has been minimized.

Copy link

commented Jan 3, 2019

7.3 compatible version:
https://github.com/Kub-AT/php-simple-html-dom-parser

Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3
https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.7/

obj63mc added a commit to obj63mc/silverstripe-seo that referenced this issue Jan 8, 2019

Update for PHPSimple HTMLDomParser
This fixes the compatibility issue with PHP 7.3 issue sunra/php-simple-html-dom-parser#64 and vulcandigital#36
@luigitek

This comment has been minimized.

Copy link

commented Apr 10, 2019

careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser

This version doesn't work as expected for example:

$dom->find('div[class=name]', 0);

The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue.

@Kub-AT

This comment has been minimized.

Copy link

commented Apr 11, 2019

careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser

This version doesn't work as expected for example:

$dom->find('div[class=name]', 0);

The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue.

It would be nice if you reported a bug here https://sourceforge.net/p/simplehtmldom/bugs/

@luigitek

This comment has been minimized.

Copy link

commented Apr 11, 2019

careful with 1.8.1 which is the version used by https://github.com/Kub-AT/php-simple-html-dom-parser
This version doesn't work as expected for example:
$dom->find('div[class=name]', 0);
The above fails if the div has more than 1 class. I'm currently working with version 1.7.1 which doesn't have this issue.

It would be nice if you reported a bug here https://sourceforge.net/p/simplehtmldom/bugs/

Thanks m8, I've opened an bug issue:
https://sourceforge.net/p/simplehtmldom/bugs/169/

I'll include more details to it as soon as I get a chance 👍

@derryberni

This comment has been minimized.

Copy link

commented Apr 13, 2019

7.3 compatible version:
https://github.com/Kub-AT/php-simple-html-dom-parser

Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3
https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.7/

hi use this
https://github.com/Kub-AT/php-simple-html-dom-parser

but i get error
Message: Call to undefined method KubAT\PhpSimple\HtmlDomParser::loadFromUrl()

@Kub-AT

@Kub-AT

This comment has been minimized.

Copy link

commented Apr 15, 2019

7.3 compatible version:
https://github.com/Kub-AT/php-simple-html-dom-parser
Author of original PHP Simple HTML DOM Parser (sourceforge hosted) did an update on 2018-12-10 (after 6 year ;)) version 1.7 is compatible with PHP 7.3
https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.7/

hi use this
https://github.com/Kub-AT/php-simple-html-dom-parser

but i get error
Message: Call to undefined method KubAT\PhpSimple\HtmlDomParser::loadFromUrl()

@Kub-AT

it looks like you have mistaken the library, there is no loadFromUrl in simplehtmldom
but is in https://github.com/paquettg/php-html-parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.