@@ -54,6 +54,8 @@ IC_METHOD(chr) {
5454 char buffer [5 ];
5555 int buffer_len = 0 ;
5656
57+ intl_error_reset (NULL );
58+
5759 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) {
5860 RETURN_NULL ();
5961 }
@@ -73,6 +75,8 @@ IC_METHOD(chr) {
7375IC_METHOD (ord ) {
7476 UChar32 cp ;
7577
78+ intl_error_reset (NULL );
79+
7680 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) {
7781 RETURN_NULL ();
7882 }
@@ -88,6 +92,8 @@ IC_METHOD(hasBinaryProperty) {
8892 zend_string * string_codepoint ;
8993 zend_long int_codepoint = 0 ;
9094
95+ intl_error_reset (NULL );
96+
9197 ZEND_PARSE_PARAMETERS_START (2 , 2 )
9298 Z_PARAM_STR_OR_LONG (string_codepoint , int_codepoint )
9399 Z_PARAM_LONG (prop )
@@ -108,6 +114,8 @@ IC_METHOD(getIntPropertyValue) {
108114 zend_string * string_codepoint ;
109115 zend_long int_codepoint = 0 ;
110116
117+ intl_error_reset (NULL );
118+
111119 ZEND_PARSE_PARAMETERS_START (2 , 2 )
112120 Z_PARAM_STR_OR_LONG (string_codepoint , int_codepoint )
113121 Z_PARAM_LONG (prop )
@@ -125,6 +133,8 @@ IC_METHOD(getIntPropertyValue) {
125133IC_METHOD (getIntPropertyMinValue ) {
126134 zend_long prop ;
127135
136+ intl_error_reset (NULL );
137+
128138 ZEND_PARSE_PARAMETERS_START (1 , 1 )
129139 Z_PARAM_LONG (prop )
130140 ZEND_PARSE_PARAMETERS_END ();
@@ -137,6 +147,8 @@ IC_METHOD(getIntPropertyMinValue) {
137147IC_METHOD (getIntPropertyMaxValue ) {
138148 zend_long prop ;
139149
150+ intl_error_reset (NULL );
151+
140152 ZEND_PARSE_PARAMETERS_START (1 , 1 )
141153 Z_PARAM_LONG (prop )
142154 ZEND_PARSE_PARAMETERS_END ();
@@ -149,6 +161,8 @@ IC_METHOD(getIntPropertyMaxValue) {
149161IC_METHOD (getNumericValue ) {
150162 UChar32 cp ;
151163
164+ intl_error_reset (NULL );
165+
152166 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) {
153167 RETURN_NULL ();
154168 }
@@ -191,6 +205,8 @@ static UBool enumCharType_callback(enumCharType_data *context,
191205IC_METHOD (enumCharTypes ) {
192206 enumCharType_data context ;
193207
208+ intl_error_reset (NULL );
209+
194210 ZEND_PARSE_PARAMETERS_START (1 , 1 )
195211 Z_PARAM_FUNC (context .fci , context .fci_cache )
196212 ZEND_PARSE_PARAMETERS_END ();
@@ -202,6 +218,8 @@ IC_METHOD(enumCharTypes) {
202218IC_METHOD (getBlockCode ) {
203219 UChar32 cp ;
204220
221+ intl_error_reset (NULL );
222+
205223 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) {
206224 RETURN_NULL ();
207225 }
@@ -220,6 +238,8 @@ IC_METHOD(charName) {
220238 zend_string * buffer = NULL ;
221239 int32_t buffer_len ;
222240
241+ intl_error_reset (NULL );
242+
223243 ZEND_PARSE_PARAMETERS_START (1 , 2 )
224244 Z_PARAM_STR_OR_LONG (string_codepoint , int_codepoint )
225245 Z_PARAM_OPTIONAL
@@ -250,6 +270,8 @@ IC_METHOD(charFromName) {
250270 UChar32 ret ;
251271 UErrorCode error = U_ZERO_ERROR ;
252272
273+ intl_error_reset (NULL );
274+
253275 ZEND_PARSE_PARAMETERS_START (1 , 2 )
254276 Z_PARAM_STRING (name , name_len )
255277 Z_PARAM_OPTIONAL
@@ -301,6 +323,7 @@ IC_METHOD(enumCharNames) {
301323 zend_long nameChoice = U_UNICODE_CHAR_NAME ;
302324 UErrorCode error = U_ZERO_ERROR ;
303325
326+ intl_error_reset (NULL );
304327
305328 ZEND_PARSE_PARAMETERS_START (3 , 4 )
306329 Z_PARAM_STR_OR_LONG (string_start , int_start )
@@ -326,6 +349,8 @@ IC_METHOD(getPropertyName) {
326349 zend_long nameChoice = U_LONG_PROPERTY_NAME ;
327350 const char * ret ;
328351
352+ intl_error_reset (NULL );
353+
329354 ZEND_PARSE_PARAMETERS_START (1 , 2 )
330355 Z_PARAM_LONG (property )
331356 Z_PARAM_OPTIONAL
@@ -348,6 +373,8 @@ IC_METHOD(getPropertyEnum) {
348373 char * alias ;
349374 size_t alias_len ;
350375
376+ intl_error_reset (NULL );
377+
351378 ZEND_PARSE_PARAMETERS_START (1 , 1 )
352379 Z_PARAM_STRING (alias , alias_len )
353380 ZEND_PARSE_PARAMETERS_END ();
@@ -361,6 +388,8 @@ IC_METHOD(getPropertyValueName) {
361388 zend_long property , value , nameChoice = U_LONG_PROPERTY_NAME ;
362389 const char * ret ;
363390
391+ intl_error_reset (NULL );
392+
364393 ZEND_PARSE_PARAMETERS_START (2 , 3 )
365394 Z_PARAM_LONG (property )
366395 Z_PARAM_LONG (value )
@@ -385,6 +414,8 @@ IC_METHOD(getPropertyValueEnum) {
385414 char * name ;
386415 size_t name_len ;
387416
417+ intl_error_reset (NULL );
418+
388419 ZEND_PARSE_PARAMETERS_START (2 , 2 )
389420 Z_PARAM_LONG (property )
390421 Z_PARAM_STRING (name , name_len )
@@ -401,6 +432,8 @@ IC_METHOD(foldCase) {
401432 zend_string * string_codepoint ;
402433 zend_long int_codepoint = 0 ;
403434
435+ intl_error_reset (NULL );
436+
404437 ZEND_PARSE_PARAMETERS_START (1 , 2 )
405438 Z_PARAM_STR_OR_LONG (string_codepoint , int_codepoint )
406439 Z_PARAM_OPTIONAL
@@ -432,6 +465,8 @@ IC_METHOD(digit) {
432465 zend_string * string_codepoint ;
433466 zend_long int_codepoint = 0 ;
434467
468+ intl_error_reset (NULL );
469+
435470 ZEND_PARSE_PARAMETERS_START (1 , 2 )
436471 Z_PARAM_STR_OR_LONG (string_codepoint , int_codepoint )
437472 Z_PARAM_OPTIONAL
@@ -456,6 +491,8 @@ IC_METHOD(digit) {
456491IC_METHOD (forDigit ) {
457492 zend_long digit , radix = 10 ;
458493
494+ intl_error_reset (NULL );
495+
459496 ZEND_PARSE_PARAMETERS_START (1 , 2 )
460497 Z_PARAM_LONG (digit )
461498 Z_PARAM_OPTIONAL
@@ -472,6 +509,8 @@ IC_METHOD(charAge) {
472509 UVersionInfo version ;
473510 int i ;
474511
512+ intl_error_reset (NULL );
513+
475514 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) {
476515 RETURN_NULL ();
477516 }
@@ -489,6 +528,8 @@ IC_METHOD(getUnicodeVersion) {
489528 UVersionInfo version ;
490529 int i ;
491530
531+ intl_error_reset (NULL );
532+
492533 ZEND_PARSE_PARAMETERS_NONE ();
493534
494535 u_getUnicodeVersion (version );
@@ -507,6 +548,8 @@ IC_METHOD(getFC_NFKC_Closure) {
507548 int32_t closure_len ;
508549 UErrorCode error = U_ZERO_ERROR ;
509550
551+ intl_error_reset (NULL );
552+
510553 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) {
511554 RETURN_NULL ();
512555 }
@@ -535,6 +578,7 @@ IC_METHOD(getFC_NFKC_Closure) {
535578#define IC_BOOL_METHOD_CHAR (name ) \
536579IC_METHOD(name) { \
537580 UChar32 cp; \
581+ intl_error_reset(NULL); \
538582 if (parse_code_point_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, &cp) == FAILURE) { \
539583 RETURN_NULL(); \
540584 } \
@@ -575,6 +619,7 @@ IC_BOOL_METHOD_CHAR(isJavaIDPart)
575619#define IC_INT_METHOD_CHAR (name ) \
576620IC_METHOD (name ) { \
577621 UChar32 cp ; \
622+ intl_error_reset (NULL ); \
578623 if (parse_code_point_param (INTERNAL_FUNCTION_PARAM_PASSTHRU , & cp ) == FAILURE ) { \
579624 RETURN_NULL (); \
580625 } \
@@ -595,6 +640,7 @@ IC_METHOD(name) { \
595640 UChar32 cp, ret; \
596641 zend_string *string_codepoint; \
597642 zend_long int_codepoint = -1; \
643+ intl_error_reset(NULL); \
598644 ZEND_PARSE_PARAMETERS_START(1, 1) \
599645 Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) \
600646 ZEND_PARSE_PARAMETERS_END(); \
0 commit comments