For PHP versions 4 through 4.2.0, if you replace:
1
| $file_size = intval($file_size); |
with:
1
| $file_size = floatval($file_size); |
it will give you the correct size.
I have not tested with all versions of PHP but you could also replace:
1
| $file_size = intval($file_size); |
with a float typecast:
1
| $file_size = (float)($file_size); |
and get the correct result.
I have tested both methods and they both return the proper size.