Skip to content

Commit

Permalink
fix: resolve type/null pointer exception in FilesCategoryProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdmlln committed Aug 28, 2024
1 parent 32f5916 commit b2690b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/DataProcessing/FilesCategoryProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ public function process(
*/
private function getFileUid(array $file): int
{
return $this->legacyReturn ? $file['properties']['uidLocal'] : $file['uidLocal'];
// uidLocal may be null while fileReferenceUid contains the actual file uid
// see: https://github.com/TYPO3-Headless/headless/pull/761
return $this->legacyReturn
? $file['properties']['uidLocal'] ?? $file['properties']['fileReferenceUid']
: $file['uidLocal'] ?? $file['fileReferenceUid'];
}

/**
Expand Down

0 comments on commit b2690b3

Please sign in to comment.