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

Commit

Permalink
Merge pull request zendframework/zendframework#2104 from marc-mabe/pa…
Browse files Browse the repository at this point in the history
…tch-1

Wddx: libxml_disable_entity_loader(true) needs to be reset with previous value
  • Loading branch information
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Adapter/Wddx.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ public function unserialize($wddx)
// check if the returned NULL is valid
// or based on an invalid wddx string
try {
libxml_disable_entity_loader(true);
$oldLibxmlDisableEntityLoader = libxml_disable_entity_loader(true);
$simpleXml = new \SimpleXMLElement($wddx);
libxml_disable_entity_loader(false);
libxml_disable_entity_loader($oldLibxmlDisableEntityLoader);
if (isset($simpleXml->data[0]->null[0])) {
return null; // valid null
}
Expand Down

0 comments on commit a2685e7

Please sign in to comment.