diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 22ca06ea6..672a5afa0 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -1695,7 +1695,9 @@ class BasicEntityPersister $idValues = $class->getIdentifierValues($value); } - $value = $idValues[key($idValues)]; + if (array_key_exists(key($idValues), $idValues)){ + $value = $idValues[key($idValues)]; + } } return $value;