Bug #103777
open\TYPO3\CMS\Core\Resource\AbstractFile::getSize returns null for files with a size of 0 byte
0%
Description
\TYPO3\CMS\Core\Resource\AbstractFile::getSize
returns `null` (which leads to problems up in the chain of callers) even though the file is valid, and the file size is there, it's just coincidentally 0 bytes (happens).
I see this as a bug.
return $size ? (int)$size : null;
(check with `isset` should be a simple solution here)
Updated by Oliver Hader 3 months ago
- Category set to File Abstraction Layer (FAL)
- Complexity changed from no-brainer to easy
Updated by Georg Ringer 3 months ago
ยท Edited
FYI
was a breaking change in v13, fine there already https://review.typo3.org/c/Packages/TYPO3.CMS/+/80002/4/typo3/sysext/core/Classes/Resource/AbstractFile.php
wolfgang, wanna do a change for v12, not adding the return type but swiching to 0 instead of null?
Updated by Georg Ringer about 2 months ago
- Has duplicate Bug #103949: ProcessedFile::getSize returns 0 added
Updated by Gerrit Code Review about 2 months ago
- Status changed from New to Under Review
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84445
Updated by Gerrit Code Review 1 day ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84445