Skip to content

Commit fa7ce56

Browse files
committed
ext/intl IntlChar::enumCharNames changes the signature to void.
1 parent d78b3fe commit fa7ce56

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ PHP 8.3 UPGRADE NOTES
8585
- Intl:
8686
. datefmt_set_timezone (and its alias IntlDateformatter::setTimeZone)
8787
now returns true on sucess, previously null was returned.
88+
. IntlChar::enumCharNames is now returning a boolean.
89+
Previously it returned null on success and false on failure.
8890

8991
- MBString:
9092
. mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional

ext/intl/uchar/uchar.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,12 @@ IC_METHOD(enumCharNames) {
309309
ZEND_PARSE_PARAMETERS_END();
310310

311311
if (convert_cp(&start, string_start, int_start) == FAILURE || convert_cp(&limit, string_limit, int_limit) == FAILURE) {
312-
RETURN_NULL();
312+
RETURN_FALSE;
313313
}
314314

315315
u_enumCharNames(start, limit, (UEnumCharNamesFn*)enumCharNames_callback, &context, nameChoice, &error);
316316
INTL_CHECK_STATUS(error, NULL);
317+
RETURN_TRUE;
317318
}
318319
/* }}} */
319320

ext/intl/uchar/uchar.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3411,7 +3411,7 @@ public static function chr(int|string $codepoint): ?string {}
34113411
public static function digit(int|string $codepoint, int $base = 10): int|false|null {}
34123412

34133413
/** @tentative-return-type */
3414-
public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME): ?bool {} // TODO return values just don't make sense
3414+
public static function enumCharNames(int|string $start, int|string $end, callable $callback, int $type = IntlChar::UNICODE_CHAR_NAME): bool {}
34153415

34163416
/** @tentative-return-type */
34173417
public static function enumCharTypes(callable $callback): void {}

ext/intl/uchar/uchar_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)