Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/2424b7a5c6b167c2fe37 to your computer and use it in GitHub Desktop.
Save doctrinebot/2424b7a5c6b167c2fe37 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-762 - https://github.com/doctrine/doctrine2/issues/5276
diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
index 93f6efa..931f019 100644
--- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
+++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
@@ -798,7 +798,7 @@ class BasicEntityPersister
$column = $this->_resultColumnNames[$column];
if (isset($this->_class->fieldNames[$column])) {
$field = $this->_class->fieldNames[$column];
- if (isset($data[$field])) {
+ if (array_key_exists($field, $data)) {
$data[$column] = $value;
} else {
$data[$field] = Type::getType($this->_class->fieldMappings[$field]['type'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment