Skip to content

Commit f9af8a2

Browse files
allow null for humanFilesize
1 parent cf95a2e commit f9af8a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Twig/AppExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getFunctions(): array
4040
];
4141
}
4242

43-
public function humanFilesize(int $size, int $precision = 2): string
43+
public function humanFilesize(?int $size, int $precision = 2): string
4444
{
4545
static $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
4646
$step = 1024;

0 commit comments

Comments
 (0)