Skip to content

Commit

Permalink
error prevention on non required uploadable files
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Feb 22, 2023
1 parent 21ee5d7 commit 5954470
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Domain/Model/DtoNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ protected function setByContext(array $contextProperties, array $data)
foreach ($contextProperties as $key => $value) {
if (is_array($value)) {
foreach ($value as $property) {
if (!isset($data[$key]) || !is_string($property) || !array_key_exists($property, $data[$key])) {
if (
!isset($data[$key])
|| !is_string($property)
|| !is_array($data[$key])
|| !array_key_exists($property, $data[$key])
) {
continue;
}

Expand Down

0 comments on commit 5954470

Please sign in to comment.