Skip to content

Commit

Permalink
fix: check for flat objects in files processor
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdmlln committed Apr 25, 2024
1 parent 8a1c8b0 commit 91573f7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Classes/DataProcessing/FilesProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ protected function processFiles(array $properties = []): ?array
{
$data = parent::processFiles($properties);
if ($data) {
foreach ($data as &$processedFile) {
unset($processedFile['properties']['crop']);
unset($processedFile['properties']['cropDimensions']);
if ((bool) ($properties['returnFlattenObject'] ?? false)) {
unset($data['properties']['crop']);
unset($data['properties']['cropDimensions']);
} else {
foreach ($data as &$processedFile) {
unset($processedFile['properties']['crop']);
unset($processedFile['properties']['cropDimensions']);
}
}
}
return $data;
Expand Down

0 comments on commit 91573f7

Please sign in to comment.