mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
check if point value is null for 2 methods in PointType
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user