Skip to content

Commit

Permalink
Update RecursiveFilterHelper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nilportugues committed Dec 5, 2015
1 parent 02ea408 commit 26e545e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Transformer/Helpers/RecursiveFilterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ private static function filterKeys(
array &$idProperties
) {
foreach ($array as $key => &$value) {
if (self::isPreservableKey($key, $keepKeys, $idProperties)) {
if (self::isPreservableKey($key, $keepKeys, $idProperties)
|| false === in_array($key, $mappings[$typeKey]->getProperties())
) {
$newArray[$key] = $value;
if (\is_array($newArray[$key])) {
self::deletePropertiesNotInFilter($mappings, $newArray[$key], $typeKey);
Expand Down

0 comments on commit 26e545e

Please sign in to comment.