Skip to content

Commit e90e972

Browse files
committed
Add test for empty string
1 parent 63fac4e commit e90e972

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ext/intl/grapheme/grapheme_string.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,9 @@ U_CFUNC PHP_FUNCTION(grapheme_strrev)
11741174

11751175
ubrk_setUText(bi, ut, &ustatus);
11761176
pos = ubrk_last(bi);
1177+
if (pos == UBRK_DONE) {
1178+
goto close;
1179+
}
11771180

11781181
current = ZSTR_LEN(string);
11791182
for (end = pstr; pos != UBRK_DONE; ) {
61 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)