Skip to content

Commit

Permalink
[BUGFIX] handle deleted files
Browse files Browse the repository at this point in the history
fixes #254
  • Loading branch information
hannesbochmann authored and Gitsko committed Jan 4, 2024
1 parent ebe4824 commit 6990dcb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/Database/RteImagesDbHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,12 @@ protected function getProcessedFile(array $attribArray): string

$siteUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');

$originalImageFile = $resourceFactory
->getFileObject((int)$attribArray['data-htmlarea-file-uid']);
try {
$originalImageFile = $resourceFactory
->getFileObject((int)$attribArray['data-htmlarea-file-uid']);
} catch (\Exception $e) {
return '';
}

if ($originalImageFile instanceof File) {
// Magic image case: get a processed file with the requested configuration
Expand Down

0 comments on commit 6990dcb

Please sign in to comment.