[php-src] PR #25594: Fix intl_error_name() truncating codes outside the int range
| From: | lacatoire | Date: | Thu, 19 Nov 2026 15:38:29 +0000 |
| Subject: | [php-src] PR #25594: Fix intl_error_name() truncating codes outside the int range | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40815@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25594
Author: lacatoire
intl_error_name() passed its 64-bit argument to u_errorName() as a 32-bit
UErrorCode, so 2**32 gave U_ZERO_ERROR while
intl_is_failure(2**32) is true. Return [BOGUS UErrorCode] for a code
outside the int range.
### To reproduce
```php
<?php
var_dump(intl_error_name(2**32), intl_is_failure(2**32));
```
Before (PHP 8.4.26 and 8.5.4): string(12) "U_ZERO_ERROR" and
bool(true)
After: string(18) "[BOGUS UErrorCode]" and bool(true)