Skip to content

Commit 94cad30

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/+/88999 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com>
1 parent e11cdce commit 94cad30

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
@@ -307,7 +307,7 @@ public function getFileType(): FileType
307307
if (!($this->properties['type'] ?? false)) {
308308
$this->properties['type'] = FileType::tryFromMimeType($this->getMimeType())->value;
309309
}
310-
return $this->properties['type'] instanceof FileType ? $this->properties['type'] : FileType::from($this->properties['type']);
310+
return $this->properties['type'] instanceof FileType ? $this->properties['type'] : FileType::from((int)$this->properties['type']);
311311
}
312312

313313
/**

0 commit comments

Comments
 (0)