diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index a405776ed..14ff8322d 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -398,13 +398,14 @@ class XmlExporter extends AbstractExporter private function exportTableOptions(\SimpleXMLElement $parentXml, array $options) { foreach ($options as $name => $option) { - $optionXml = is_array($option) + $isArray = is_array($option); + $optionXml = $isArray ? $parentXml->addChild('option') : $parentXml->addChild('option', (string) $option); $optionXml->addAttribute('name', (string) $name); - if (is_array($option)) { + if ($isArray) { $this->exportTableOptions($optionXml, $option); } }