From 00c5f47f1f5dc59405bd683b3c345bc0abcc589a Mon Sep 17 00:00:00 2001 From: peterbaumert Date: Tue, 4 Apr 2023 12:01:49 +0200 Subject: [PATCH 1/2] Example of PointType is wrong If not checking for null, it will always show in for example "contain". --- en/orm/database-basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/orm/database-basics.rst b/en/orm/database-basics.rst index a1b1914b40..75e99342e0 100644 --- a/en/orm/database-basics.rst +++ b/en/orm/database-basics.rst @@ -648,7 +648,7 @@ value object and into SQL expressions:: { public function toPHP($value, DriverInterface $d) { - return Point::parse($value); + return null === $value ? null : Point::parse($value); } public function marshal($value) From 33c48bda6e5c0d0d8b0b01d390dffcd8f00b26d8 Mon Sep 17 00:00:00 2001 From: peterbaumert Date: Tue, 4 Apr 2023 14:30:50 +0200 Subject: [PATCH 2/2] Update database-basics.rst --- en/orm/database-basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/orm/database-basics.rst b/en/orm/database-basics.rst index 75e99342e0..e739f8e386 100644 --- a/en/orm/database-basics.rst +++ b/en/orm/database-basics.rst @@ -648,7 +648,7 @@ value object and into SQL expressions:: { public function toPHP($value, DriverInterface $d) { - return null === $value ? null : Point::parse($value); + return $value === null ? null : Point::parse($value); } public function marshal($value)