vinkla/hashids

gmp_mod Argument #1 ($num1) is not an integer string

sts-ryan-holton opened this issue · 3 comments

I'm using the latest version of Hashids in my Laravel 11 project running PHP 8.3 and have stumbled upon an issue, given the following, which is a numeric string:

(new Hashids('', 7))->encode('09009956789098')

An error is produced:

gmp_mod(): Argument #1 ($num1) is not an integer string

I have GMP installed via PHP on the server. What are the workarounds for this please?

Please use a forum instead.

@vinkla What do you suggest? This didn't happen in older versions of Hashids. If my string doesn't start with a zero then there's no issue.