#103777\TYPO3\CMS\Core\Resource\AbstractFile::getSize returns null for files with a size of 0 byte
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)
Reviews 2
Related issues 1
History 610
-
Oliver Hader changed category Complexity
no-brainereasy 05/02/24, 15:37 -
Georg Ringer commented 05/03/24, 05:56
-
Georg Ringer changed Duplicated by #103949 05/29/24, 20:30
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 84445 status
NewUnder Review 05/29/24, 20:57 -
Gerrit Code Review pushed patch set 2 for 12.4 to change 84445 07/16/24, 12:26
-
Gerrit Code Review pushed patch set 3 for 12.4 to change 84445 07/23/24, 11:38
-
Christian Kuhn changed Related to #101327 07/24/24, 11:09
-
Gerrit Code Review pushed patch set 4 for 12.4 to change 84445 07/24/24, 11:09
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % 07/24/24, 12:25Applied in changeset commit:f778344689ab714a1d29a6ccb98d2b63c3648381.
-
Benni Mack changed status
ResolvedClosed 10/15/24, 09:31
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?