Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable external loading on DOM and Soap components use of DOMDocument
Browse files Browse the repository at this point in the history
padraic committed Aug 1, 2012

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Query.php
Original file line number Diff line number Diff line change
@@ -233,6 +233,7 @@ public function queryXpath($xpathQuery, $query = null)

$encoding = $this->getEncoding();
libxml_use_internal_errors(true);
libxml_disable_entity_loader(true);
if (null === $encoding) {
$domDoc = new DOMDocument('1.0');
} else {
@@ -255,6 +256,7 @@ public function queryXpath($xpathQuery, $query = null)
$this->documentErrors = $errors;
libxml_clear_errors();
}
libxml_disable_entity_loader(false);
libxml_use_internal_errors(false);

if (!$success) {

0 comments on commit 1b246ad

Please sign in to comment.