Skip to content

Commit 5e0b2e5

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
2 parents 9b5a263 + 7c3dfbb commit 5e0b2e5

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ PHP NEWS
1414
. Fixed bug GH-8848 (imagecopyresized() error refers to the wrong argument).
1515
(cmb)
1616

17+
- Intl:
18+
. Fixed build for ICU 69.x and onwards. (David Carlier)
19+
1720
- OPcache:
1821
. Fixed bug GH-8847 (PHP hanging infinitly at 100% cpu when check php
1922
syntaxe of a valid file). (Dmitry)

ext/intl/converter/converter.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,10 +933,18 @@ static zend_object *php_converter_clone_object(zend_object *object) {
933933

934934
intl_errors_reset(&oldobj->error);
935935

936+
#if U_ICU_VERSION_MAJOR_NUM > 70
937+
objval->src = ucnv_clone(oldobj->src, &error);
938+
#else
936939
objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error);
940+
#endif
937941
if (U_SUCCESS(error)) {
938942
error = U_ZERO_ERROR;
943+
#if U_ICU_VERSION_MAJOR_NUM > 70
944+
objval->dest = ucnv_clone(oldobj->dest, &error);
945+
#else
939946
objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error);
947+
#endif
940948
}
941949
if (U_FAILURE(error)) {
942950
zend_string *err_msg;

ext/intl/grapheme/grapheme_util.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,6 @@ zend_long grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *need
372372
/* {{{ grapheme_get_break_iterator: get a clone of the global character break iterator */
373373
UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status )
374374
{
375-
int32_t buffer_size;
376-
377375
UBreakIterator *global_break_iterator = INTL_G( grapheme_iterator );
378376

379377
if ( NULL == global_break_iterator ) {
@@ -387,8 +385,12 @@ UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *stat
387385
INTL_G(grapheme_iterator) = global_break_iterator;
388386
}
389387

390-
buffer_size = U_BRK_SAFECLONE_BUFFERSIZE;
388+
#if U_ICU_VERSION_MAJOR_NUM >= 69
389+
return ubrk_clone(global_break_iterator, status);
390+
#else
391+
int32_t buffer_size = U_BRK_SAFECLONE_BUFFERSIZE;
391392

392393
return ubrk_safeClone(global_break_iterator, stack_buffer, &buffer_size, status);
394+
#endif
393395
}
394396
/* }}} */

0 commit comments

Comments
 (0)