diff --git a/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php index 5eb8cc117..5fb77d67e 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php @@ -123,7 +123,7 @@ class SimpleObjectHydrator extends AbstractHydrator } // Check if value is null before conversion (because some types convert null to something else) - $valueIsNull = $value === null; + $valueIsNull = null === $value; // Convert field to a valid PHP value if (isset($cacheKeyInfo['type'])) {