From c47c23a101a6acebf63156c3d70917c49fd8905a Mon Sep 17 00:00:00 2001 From: Carl Vuorinen Date: Sun, 4 Sep 2016 18:37:03 +0300 Subject: [PATCH] Use yoda condition in the null check --- lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'])) {