fix: don't show object size warning if we can't determine the object size

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2025-09-05 18:01:43 +02:00
parent b3f29e1039
commit 7e01665f93
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -155,7 +155,7 @@ class File extends Command {
}
$stat = fstat($fh);
fclose($fh);
if ($stat['size'] !== $node->getSize()) {
if (isset($stat['size']) && $stat['size'] !== $node->getSize()) {
$output->writeln(' <error>warning: object had a size of ' . $stat['size'] . ' but cache entry has a size of ' . $node->getSize() . '</error>. This should have been automatically repaired');
}
} catch (\Exception $e) {