Skip to content

Commit

Permalink
Merge pull request #139 from ConductionNL/development
Browse files Browse the repository at this point in the history
Dev to main
  • Loading branch information
bbrands02 authored Jan 17, 2025
2 parents 7ab3cee + 1cbfd2e commit 4e4207f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Service/ObjectService.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ private function addObject(
// Handle nested object in array
$nestedObject = $this->saveObject(
register: $register,
schema: $subSchema,
schema: (int) $subSchema,
object: $item,
depth: $depth-1
);
Expand Down Expand Up @@ -834,7 +834,7 @@ private function handleArrayProperty(
return $items;
}

if ($property['items']['type'] === 'file') {
if (isset($property['items']['type']) === true && $property['items']['type'] === 'file') {
foreach ($items as $index => $item) {
$items[$index] = $this->handleFileProperty(
objectEntity: $objectEntity,
Expand Down Expand Up @@ -972,6 +972,10 @@ private function handleProperty(
int $depth = 0
): array
{
if (isset($property['type']) === false) {
return $object;
}

switch($property['type']) {
case 'object':
$object[$propertyName] = $this->handleObjectProperty(
Expand Down

0 comments on commit 4e4207f

Please sign in to comment.