Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix XmlDriver problems when used in context of libxml_disable_entity_…

…loader()
  • Loading branch information...
commit 7e877e6d9b359eb6f9384b7af3de7a97415801bb 1 parent 09f046b
@beberlei beberlei authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Doctrine/ODM/CouchDB/Mapping/Driver/XmlDriver.php
View
4 lib/Doctrine/ODM/CouchDB/Mapping/Driver/XmlDriver.php
@@ -154,7 +154,9 @@ public function loadMetadataForClass($className, ClassMetadata $class)
protected function loadMappingFile($file)
{
$result = array();
- $xmlElement = simplexml_load_file($file);
+ $entity = libxml_disable_entity_loader(true);
+ $xmlElement = simplexml_load_string(file_get_contents($file));
+ libxml_disable_entity_loader($entity);
foreach (array('document', 'embedded-document', 'mapped-superclass') as $type) {
if (isset($xmlElement->$type)) {
Please sign in to comment.
Something went wrong with that request. Please try again.