Skip to content

Commit

Permalink
Merge pull request doctrine#160 from flojon/xml-driver-type-cast
Browse files Browse the repository at this point in the history
Add missing type casts for versionable and referenceable in XML driver
  • Loading branch information
lsmith77 committed Aug 13, 2012
2 parents b812265 + 6bebe78 commit fb8bb69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ODM/PHPCR/Mapping/Driver/XmlDriver.php
Expand Up @@ -69,11 +69,11 @@ public function loadMetadataForClass($className, ClassMetadata $class)
}

if (isset($xmlRoot['versionable']) && $xmlRoot['versionable'] !== 'false') {
$class->setVersioned($xmlRoot['versionable']);
$class->setVersioned((string)$xmlRoot['versionable']);
}

if (isset($xmlRoot['referenceable']) && $xmlRoot['referenceable'] !== 'false') {
$class->setReferenceable($xmlRoot['referenceable']);
$class->setReferenceable((bool)$xmlRoot['referenceable']);
}

$class->setNodeType(isset($xmlRoot['nodeType']) ? (string) $xmlRoot['nodeType'] : 'nt:unstructured');
Expand Down

0 comments on commit fb8bb69

Please sign in to comment.