Skip to content
Snippets Groups Projects
Commit 38a8b46d authored by sypets@gmx.de's avatar sypets@gmx.de Committed by Stefan Bürk
Browse files

[BUGFIX] Handle array access in LocalImageProcessor

Handle missing image dimensions (width, height)
without throwing an exception.

In same cases, image dimension may not be able to be
set properly.

Resolves: #99406
Releases: main, 11.5
Change-Id: I81124dcaf29932448a87b69ab5bf6445eeb7469c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77757


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 409f8f73
Branches
Tags
No related merge requests found
......@@ -121,8 +121,8 @@ class LocalImageProcessor implements ProcessorInterface, LoggerAwareInterface
$task->setExecuted(true);
$imageDimensions = $this->getGraphicalFunctionsObject()->getImageDimensions($localProcessedFile);
$properties = [
'width' => $imageDimensions[0],
'height' => $imageDimensions[1],
'width' => $imageDimensions[0] ?? 0,
'height' => $imageDimensions[1] ?? 0,
'size' => filesize($localProcessedFile),
'checksum' => $task->getConfigurationChecksum(),
];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment