check if point value is null for 2 methods in PointType

This commit is contained in:
nobohan 2021-04-30 13:51:45 +02:00
parent bec0700d39
commit 91860afd80

View File

@ -36,7 +36,11 @@ class PointType extends Type {
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return Point::fromGeoJson($value);
if ($value === NULL){
return NULL;
} else {
return Point::fromGeoJson($value);
}
}
public function getName()
@ -46,7 +50,11 @@ class PointType extends Type {
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
return $value->toWKT();
if ($value === NULL){
return NULL;
} else {
return $value->toWKT();
}
}
public function canRequireSQLConversion()