Skip to content

Commit e7c333d

Browse files
committed
Add check for setUText
1 parent a9f14af commit e7c333d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ext/intl/grapheme/grapheme_string.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,14 @@ U_CFUNC PHP_FUNCTION(grapheme_strrev)
11731173
p = ZSTR_VAL(ret);
11741174

11751175
ubrk_setUText(bi, ut, &ustatus);
1176+
if (U_FAILURE(ustatus)) {
1177+
intl_error_set_code(nullptr, ustatus);
1178+
intl_error_set_custom_msg(nullptr, "Error ubrk_setUText");
1179+
1180+
RETVAL_FALSE;
1181+
goto ubrk_end;
1182+
}
1183+
11761184
pos = ubrk_last(bi);
11771185
if (pos == UBRK_DONE) {
11781186
goto ubrk_end;

0 commit comments

Comments
 (0)