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

I am having an error with the htmlnode.php when my script is online. #181

Closed
ressilzafra opened this issue May 22, 2019 · 4 comments
Closed

Comments

@ressilzafra
Copy link

Can someone help me with this problem? Thanks in advance.

PHP Fatal error: Uncaught TypeError: Return value of PHPHtmlParser\Dom\HtmlNode::clear() must be an instance of PHPHtmlParser\Dom\void, none returned in /-----/public_html/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/HtmlNode.php:196
Stack trace:
#0 /-----/public_html/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/InnerNode.php(438): PHPHtmlParser\Dom\HtmlNode->clear()
#1 /-----/public_html/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/InnerNode.php(169): PHPHtmlParser\Dom\InnerNode->setParent(Object(PHPHtmlParser\Dom\HtmlNode))
#2 /-----/public_html/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom.php(570): PHPHtmlParser\Dom\InnerNode->addChild(Object(PHPHtmlParser\Dom\HtmlNode))
#3 /-----/public_html/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom.php(209): PHPHtmlParser\Dom->parse()
#4 /home/270804.cloudwaysapps.com/ in /-----/public_html/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/HtmlNode.php on line 196

@salvatorecapolupo
Copy link

Same problem with any URL, while integrating into WordPress using composer.

@defunctl
Copy link

defunctl commented Jun 3, 2019

Which PHP version are you guys running?

@defunctl
Copy link

defunctl commented Jun 3, 2019

Yeah, that method is type casted as void which was added in PHP 7.1

@paquettg
Copy link
Owner

Yes, we do not support PHP 7.0, which appears to be the issue here.

I am going to close off this issue, please feel free to let me know if this assumption is in correct.

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

4 participants