diff --git a/src/Bundle/ChillMainBundle/Doctrine/Type/PointType.php b/src/Bundle/ChillMainBundle/Doctrine/Type/PointType.php index 6b6f7c113..086b566da 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Type/PointType.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Type/PointType.php @@ -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()