The method convertToPHPValue of class XMLType returns boolean true if nullable column equals null. The use of short comparison operator is causing this issue.
Solution:
This block:
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value === null ?: new \SimpleXMLElement($value);
}
Should be replaced by this:
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value === null ? null : new \SimpleXMLElement($value);
}
Or for PHP versions >= 7:
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value === null ?? new \SimpleXMLElement($value);
}
The method convertToPHPValue of class XMLType returns boolean true if nullable column equals null. The use of short comparison operator is causing this issue. Solution:
This block:
Should be replaced by this:
Or for PHP versions >= 7:
See [PR-22]](https://github.com/opensoft/doctrine-postgres-types/pull/22) for PHP version > 5 fix.