[php-src] Issue #14034: gmp_mod(): Argument #1 ($num1) is not an integer string
| From: | sts-ryan-holton | Date: | Tue, 23 Apr 2024 11:47:52 +0000 |
| Subject: | [php-src] Issue #14034: gmp_mod(): Argument #1 ($num1) is not an integer string | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246804@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/14034
Author: sts-ryan-holton
### Description
The following code:
```php
(new Hashids('', 7))->encode('09009956789098')
```
Resulted in this output:
```
gmp_mod(): Argument #1 ($num1) is not an integer string
```
Only seems to happen when the start of the string contains a zero. Also asked at https://stackoverflow.com/questions/78371967/gmp-mod-argument-1-num1-is-not-an-integer-string-hashids-package
But I expected a correct output
usin t
### PHP Version
8.3.6
### Operating System
CentOS 9 stream