mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
check if point value is null for 2 methods in PointType
This commit is contained in:
parent
bec0700d39
commit
91860afd80
@ -36,7 +36,11 @@ class PointType extends Type {
|
|||||||
*/
|
*/
|
||||||
public function convertToPHPValue($value, AbstractPlatform $platform)
|
public function convertToPHPValue($value, AbstractPlatform $platform)
|
||||||
{
|
{
|
||||||
return Point::fromGeoJson($value);
|
if ($value === NULL){
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
return Point::fromGeoJson($value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getName()
|
||||||
@ -46,7 +50,11 @@ class PointType extends Type {
|
|||||||
|
|
||||||
public function convertToDatabaseValue($value, AbstractPlatform $platform)
|
public function convertToDatabaseValue($value, AbstractPlatform $platform)
|
||||||
{
|
{
|
||||||
return $value->toWKT();
|
if ($value === NULL){
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
return $value->toWKT();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canRequireSQLConversion()
|
public function canRequireSQLConversion()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user