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

TypeError is thrown when calling Crawler::html() #615

Open
syl20b opened this issue Dec 4, 2023 · 1 comment
Open

TypeError is thrown when calling Crawler::html() #615

syl20b opened this issue Dec 4, 2023 · 1 comment

Comments

@syl20b
Copy link
Contributor

syl20b commented Dec 4, 2023

Hello,

I'm upgrading from 2.1.0 to 2.1.1 and I encounter the following error :

TypeError: Symfony\Component\Panther\DomCrawler\Crawler::html(): Return value must be of type string, null returned

It seems that the Crawler::html() method must return a string, but as it calls the Crawler::attr() method under the hood, this can lead to a return null statement when the content is empty.

@alexandre-mace
Copy link
Contributor

I'm also having the same error, temporary downgraded to 2.1.0 (my code works again now) waiting for the PR to be merged, thanks for opening this issue, you saved me a bit of time @syl20b

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