From a65996f74ccb703ea04ba83db2e55565fa01ad03 Mon Sep 17 00:00:00 2001 From: TR Date: Thu, 1 Nov 2012 23:59:57 +0000 Subject: [PATCH] notice is thrown up if no identifier values found wrapping the setting of value with an array_key_exists to prevent a notice from being thrown --- lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;