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;