@@ -84,7 +84,6 @@ PHP_FUNCTION(grapheme_strpos)
84
84
char * haystack , * needle ;
85
85
size_t haystack_len , needle_len ;
86
86
const char * found ;
87
- char * locale = "" ;
88
87
zend_long loffset = 0 ;
89
88
int32_t offset = 0 ;
90
89
size_t noffset = 0 ;
@@ -122,7 +121,7 @@ PHP_FUNCTION(grapheme_strpos)
122
121
}
123
122
124
123
/* do utf16 part of the strpos */
125
- ret_pos = grapheme_strpos_utf16 (haystack , haystack_len , needle , needle_len , offset , NULL , 0 /* fIgnoreCase */ , 0 , locale /* last */ );
124
+ ret_pos = grapheme_strpos_utf16 (haystack , haystack_len , needle , needle_len , offset , NULL , 0 /* fIgnoreCase */ , 0 , "" /* last */ );
126
125
127
126
if ( ret_pos >= 0 ) {
128
127
RETURN_LONG (ret_pos );
@@ -148,7 +147,7 @@ PHP_FUNCTION(grapheme_stripos)
148
147
Z_PARAM_STRING (needle , needle_len )
149
148
Z_PARAM_OPTIONAL
150
149
Z_PARAM_LONG (loffset )
151
- Z_PARAM_STRING_OR_NULL (locale , locale_len )
150
+ Z_PARAM_STRING (locale , locale_len )
152
151
ZEND_PARSE_PARAMETERS_END ();
153
152
154
153
if ( OUTSIDE_STRING (loffset , haystack_len ) ) {
@@ -272,7 +271,7 @@ PHP_FUNCTION(grapheme_strripos)
272
271
Z_PARAM_STRING (needle , needle_len )
273
272
Z_PARAM_OPTIONAL
274
273
Z_PARAM_LONG (loffset )
275
- Z_PARAM_STRING_OR_NULL (locale , locale_len )
274
+ Z_PARAM_STRING (locale , locale_len )
276
275
ZEND_PARSE_PARAMETERS_END ();
277
276
278
277
if ( OUTSIDE_STRING (loffset , haystack_len ) ) {
@@ -553,15 +552,14 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas
553
552
Z_PARAM_STRING (needle , needle_len )
554
553
Z_PARAM_OPTIONAL
555
554
Z_PARAM_BOOL (part )
556
- Z_PARAM_STRING_OR_NULL (locale , locale_len )
555
+ Z_PARAM_STRING (locale , locale_len )
557
556
ZEND_PARSE_PARAMETERS_END ();
558
557
} else {
559
558
ZEND_PARSE_PARAMETERS_START (2 , 3 )
560
559
Z_PARAM_STRING (haystack , haystack_len )
561
560
Z_PARAM_STRING (needle , needle_len )
562
561
Z_PARAM_OPTIONAL
563
562
Z_PARAM_BOOL (part )
564
- Z_PARAM_STRING_OR_NULL (locale , locale_len )
565
563
ZEND_PARSE_PARAMETERS_END ();
566
564
}
567
565
@@ -944,7 +942,7 @@ PHP_FUNCTION(grapheme_levenshtein)
944
942
Z_PARAM_LONG (cost_ins )
945
943
Z_PARAM_LONG (cost_rep )
946
944
Z_PARAM_LONG (cost_del )
947
- Z_PARAM_STRING_OR_NULL (locale , locale_len )
945
+ Z_PARAM_STRING (locale , locale_len )
948
946
ZEND_PARSE_PARAMETERS_END ();
949
947
950
948
if (cost_ins <= 0 || cost_ins > UINT_MAX / 4 ) {
0 commit comments