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

Attempt to read property "length" on null in src/Readability.php on line 1514 #15

Closed
thedf opened this issue Mar 7, 2023 · 2 comments
Closed

Comments

@thedf
Copy link

thedf commented Mar 7, 2023

related to : #12
Hey @fivefilters , we are getting this error instead in php8.1.
Attempt to read property "length" on null in /PATH/vendor/fivefilters/readability.php/src/Readability.php on line 1514

it's probably better to make the fix something like this :
vendor/fivefilters/readability.php/src/Readability.php:1506 : $siblings = $parentOfTopCandidate->childNodes ?? [];

Thanks for your attention on this !

@thedf thedf changed the title ttempt to read property "length" on null in src/Readability.php on line 1514 Attempt to read property "length" on null in src/Readability.php on line 1514 Mar 7, 2023
@fivefilters
Copy link
Owner

Thanks for reporting this. Should have tested the earlier fix better.

It should now be fixed in v3.1.4

Using ?? [] would still have the same problem (no length property).

@thedf
Copy link
Author

thedf commented Mar 8, 2023

Thanks for the fix and the information !

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

2 participants