8000 Able to load big xml files with DomCrawler by zorn-v · Pull Request #16873 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Able to load big xml files with DomCrawler #16873

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add check is LIBXML_PARSEHUGE constant defined
  • Loading branch information
Zorn committed Dec 10, 2015
commit 4b9bbcc12b7ca61b5546564c42f51b2d77ff0f1b
2 changes: 1 addition & 1 deletion src/Symfony/Component/DomCrawler/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function addXmlContent($content, $charset = 'UTF-8')
$dom->validateOnParse = true;

if ('' !== trim($content)) {
@$dom->loadXML($content, LIBXML_NONET | LIBXML_PARSEHUGE);
@$dom->loadXML($content, LIBXML_NONET | (defined('LIBXML_PARSEHUGE') ? LIBXML_PARSEHUGE : 0));
}

libxml_use_internal_errors($internalErrors);
Expand Down
0