You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 23, 2023. It is now read-only.
Hi,
when running the test suite on 32bit systems (I tested on ARM & x86), tests fail with
There were 2 errors:
1) FG\Test\ASN1\Universal\BitStringTest::testContent
TypeError: dechex(): Argument #1 ($num) must be of type int, float given
/builddir/build/BUILDROOT/php-fgrosse-phpasn1-2.3.0-1.fc35.arm/usr/share/php/FG/ASN1/Universal/OctetString.php:28
/builddir/build/BUILDROOT/php-fgrosse-phpasn1-2.3.0-1.fc35.arm/usr/share/php/FG/ASN1/Universal/BitString.php:32
/builddir/build/BUILD/PHPASN1-20299033c35f4300eb656e7e8e88cf52d1d6694e/tests/ASN1/Universal/BitStringTest.php:45
2) FG\Test\ASN1\Universal\OctetStringTest::testContent
TypeError: dechex(): Argument #1 ($num) must be of type int, float given
/builddir/build/BUILDROOT/php-fgrosse-phpasn1-2.3.0-1.fc35.arm/usr/share/php/FG/ASN1/Universal/OctetString.php:28
/builddir/build/BUILD/PHPASN1-20299033c35f4300eb656e7e8e88cf52d1d6694e/tests/ASN1/Universal/OctetStringTest.php:45
I think what happens here is that the number used for testing, 0xA01200C3, exceeds PHP_INT_MAX on 32bit and so gets cast to float before being passed to dechex().
Is the library supposed to be able to deal with larger ints in there or is this just an error in the tests?