From 185a0fb19c80e5ee28ff4c9d58209993b636aa62 Mon Sep 17 00:00:00 2001 From: TR <g@8vue.com> Date: Fri, 2 Nov 2012 00:33:55 +0000 Subject: [PATCH] refactoring getIndividualValue for valid key value refactoring getIndividualValue --- lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 672a5afa0..40b7f09d9 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -1695,9 +1695,10 @@ class BasicEntityPersister $idValues = $class->getIdentifierValues($value); } - if (array_key_exists(key($idValues), $idValues)){ - $value = $idValues[key($idValues)]; - } + $key = key($idValues); + if (null !== $key){ + $value = $idValues[$key]; + } } return $value;