Skip to content

Commit 8d45746

Browse files
committed
Ensure that library re-sets original xml entity loading value after doing what is needed
1 parent 91b3d70 commit 8d45746

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Common/XMLReader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ public function getDomFromZip($zipFile, $xmlFile)
7171
*/
7272
public function getDomFromString($content)
7373
{
74+
$originalLibXMLEntityValue = libxml_disable_entity_loader();
7475
libxml_disable_entity_loader(true);
7576
$this->dom = new \DOMDocument();
7677
$this->dom->loadXML($content);
77-
78+
libxml_disable_entity_loader($originalLibXMLEntityValue);
7879
return $this->dom;
7980
}
8081

0 commit comments

Comments
 (0)