Skip to content

Commit

Permalink
Fixing undefined access to $value[$propertyName]
Browse files Browse the repository at this point in the history
  • Loading branch information
nilportugues committed Jun 2, 2016
1 parent 3a480de commit 92ae224
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Transformer/Helpers/RecursiveFormatterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ public static function getIdPropertyAndValues(array &$mappings, array &$value, s
$idProperties = self::getIdProperties($mappings, $type);

foreach ($idProperties as &$propertyName) {
$values[] = self::getIdValue($value[$propertyName]);
$propertyName = \sprintf('{%s}', $propertyName);
if (!empty($value[$propertyName])) {
$values[] = self::getIdValue($value[$propertyName]);
$propertyName = \sprintf('{%s}', $propertyName);
}
}
self::flattenObjectsWithSingleKeyScalars($values);

Expand Down

0 comments on commit 92ae224

Please sign in to comment.