1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-23 00:39:47 +01:00

Update EntityPopulator.php

[fix] undefined index warning protection
This commit is contained in:
Daniel Bojdo 2014-01-29 13:41:48 +01:00
parent 4590496843
commit fc8e4b113c

View File

@ -106,7 +106,7 @@ class EntityPopulator
if ($mapping['targetEntity'] == $relatedClass) {
if ($mapping['type'] == ClassMetadata::ONE_TO_ONE) {
$unique = true;
$optional = $mapping['joinColumns'][0]['nullable'];
$optional = isset($mapping['joinColumns'][0]['nullable']) ? $mapping['joinColumns'][0]['nullable'] : false;
break;
}
}