diff --git a/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php index 798bd305a..785a2b796 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php @@ -122,7 +122,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'])) {