Closed devParry closed 1 year ago
I've filed an issue with the https://github.com/google/php-crc32 repo here. The function being called here is
protected function supportsBuiltinCrc32c()
{
return Builtin::supports(CRC32::CASTAGNOLI);
}
And I see nothing wrong with that code. It could be a problem that only occurs on Windows, as I cannot duplicate the warning on Mac OSX or Linux:
var_dump(Google\CRC32\CRC32::CASTAGNOLI);
// int(2197175160)
As this value is an int
and not a float
, I don't see how the warning could be thrown. Maybe on Windows RC32::CASTAGNOLI
is being interpreted as a float
?
Edit: The difference in behavior could be dependent on whether or not the crc32c
extension is installed.
Should be fixed now.
Environment details
Steps to reproduce
Code example
But now we have upgraded to PHP 8.1. After the version upgrade, we are facing an error while uploading files. E.g: Message: Implicit conversion from float 3988292384 to int loses precision
Please check the Screen-shot as well :
Could you please let us know how we can fix this?
Thanks!