diff --git a/src/Mapper/XmlModelMapper.php b/src/Mapper/XmlModelMapper.php index 7df5401..80bdec9 100644 --- a/src/Mapper/XmlModelMapper.php +++ b/src/Mapper/XmlModelMapper.php @@ -399,7 +399,7 @@ protected function createDomNode(\DOMDocument $domDocument, string $name, $value */ protected function mapPropertyByType(ModelPropertyType $propertyType, $value) { $value = Iteration::typeFilter($value); - if($propertyType->getActualType() === TypeEnum::ARRAY && !is_array($value) ) { + if($propertyType->getActualType() === TypeEnum::ARRAY && !is_array($value) && !is_null($value)) { $value = [$value]; }