Skip to content

Commit c9f3792

Browse files
committed
Ensure property exist before assignation
1 parent 387c4ab commit c9f3792

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/JsonMapperHelper.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public static function setUndefinedProperty($object, $propName, $jsonValue)
2121
$object->{$propName} = $jsonValue;
2222
$object->customFields[$propName] = $jsonValue;
2323
}
24-
} else {
25-
$object->{$propName} = $jsonValue;
26-
}
24+
} elseif(isset($object->{$propName})) {
25+
$object->{$propName} = $jsonValue;
26+
}
2727
}
2828
}

0 commit comments

Comments
 (0)