Skip to content

Commit 09ccf57

Browse files
georgringerlolli42
authored andcommitted
[BUGFIX] Add typecast to avoid TypeError
Cast the file type to an integer to avoid exceptions dealing with strings. Related: #106422 Resolves: #106528 Releases: main, 13.4 Change-Id: Idb5b2db28399bbfefb3263694ef619815ac1f0fc Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88995 Tested-by: core-ci <typo3@b13.com> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
1 parent 9b9861b commit 09ccf57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typo3/sysext/core/Classes/Resource/AbstractFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public function getFileType(): FileType
240240
if (!($this->properties['type'] ?? false)) {
241241
$this->properties['type'] = FileType::tryFromMimeType($this->getMimeType())->value;
242242
}
243-
return $this->properties['type'] instanceof FileType ? $this->properties['type'] : FileType::from($this->properties['type']);
243+
return $this->properties['type'] instanceof FileType ? $this->properties['type'] : FileType::from((int)$this->properties['type']);
244244
}
245245

246246
/**

0 commit comments

Comments
 (0)