Skip to content

Commit

Permalink
Update XmlExporter.php - Type problem in php8.x (#9589)
Browse files Browse the repository at this point in the history
Please see PHP interface SimpleXMLElement::addAttribute(string $name, string $value = null, string $namespace = null): void .... 
The $value must be string or null.
  • Loading branch information
vrestihnat authored Mar 19, 2022
1 parent 33da4d8 commit c6831c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
$discriminatorColumnXml->addAttribute('type', $metadata->discriminatorColumn['type']);

if (isset($metadata->discriminatorColumn['length'])) {
$discriminatorColumnXml->addAttribute('length', $metadata->discriminatorColumn['length']);
$discriminatorColumnXml->addAttribute('length', (string) $metadata->discriminatorColumn['length']);
}
}

Expand Down Expand Up @@ -339,7 +339,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
}

if (isset($inverseJoinColumn['nullable'])) {
$inverseJoinColumnXml->addAttribute('nullable', $inverseJoinColumn['nullable']);
$inverseJoinColumnXml->addAttribute('nullable', $inverseJoinColumn['nullable'] ? 'true' : 'false');
}

if (isset($inverseJoinColumn['orderBy'])) {
Expand All @@ -365,7 +365,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata)
}

if (isset($joinColumn['nullable'])) {
$joinColumnXml->addAttribute('nullable', $joinColumn['nullable']);
$joinColumnXml->addAttribute('nullable', $joinColumn['nullable'] ? 'true' : 'false');
}
}
}
Expand Down

0 comments on commit c6831c6

Please sign in to comment.