Skip to content

Commit 582e8bc

Browse files
committed
Fix nagative case
1 parent e7c333d commit 582e8bc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ext/intl/grapheme/grapheme_string.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,11 +1178,12 @@ U_CFUNC PHP_FUNCTION(grapheme_strrev)
11781178
intl_error_set_custom_msg(nullptr, "Error ubrk_setUText");
11791179

11801180
RETVAL_FALSE;
1181-
goto ubrk_end;
1181+
goto ubrk_false_end;
11821182
}
11831183

11841184
pos = ubrk_last(bi);
11851185
if (pos == UBRK_DONE) {
1186+
RETVAL_EMPTY_STRING();
11861187
goto ubrk_end;
11871188
}
11881189

@@ -1201,6 +1202,7 @@ U_CFUNC PHP_FUNCTION(grapheme_strrev)
12011202
ubrk_end:
12021203
*p = '\0';
12031204
RETVAL_NEW_STR(ret);
1205+
ubrk_false_end:
12041206
ubrk_close(bi);
12051207
close:
12061208
utext_close(ut);

0 commit comments

Comments
 (0)