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 Feb 13, 2023. It is now read-only.
Hello
In BcNumber::int() at line 141, is the following code
if (bccomp(strval(PHP_INT_MAX), $this->value, 0) === 1) { throw new \DomainException('Stored BcNumber cannot be converted to signed PHP integer, exceeds PHP_INT_MAX'); }
bccomp will return 1 if the first parameter is larger that the second parameter. So in this code, an exception will be thrown if PHP_INT_MAX is greater than $value, which does not make sense.
Should it perhaps be comparing to -1?
if (bccomp(strval(PHP_INT_MAX), $this->value, 0) === -1) {
Hello
In
BcNumber::int()at line 141, is the following codebccompwill return 1 if the first parameter is larger that the second parameter. So in this code, an exception will be thrown if PHP_INT_MAX is greater than $value, which does not make sense.Should it perhaps be comparing to -1?
Thank you for your efforts.
Regards, Jason.