@@ -84,7 +84,6 @@ PHP_FUNCTION(grapheme_strpos)
8484 char * haystack , * needle ;
8585 size_t haystack_len , needle_len ;
8686 const char * found ;
87- char * locale = "" ;
8887 zend_long loffset = 0 ;
8988 int32_t offset = 0 ;
9089 size_t noffset = 0 ;
@@ -122,7 +121,7 @@ PHP_FUNCTION(grapheme_strpos)
122121 }
123122
124123 /* 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 */ );
126125
127126 if ( ret_pos >= 0 ) {
128127 RETURN_LONG (ret_pos );
@@ -148,7 +147,7 @@ PHP_FUNCTION(grapheme_stripos)
148147 Z_PARAM_STRING (needle , needle_len )
149148 Z_PARAM_OPTIONAL
150149 Z_PARAM_LONG (loffset )
151- Z_PARAM_STRING_OR_NULL (locale , locale_len )
150+ Z_PARAM_STRING (locale , locale_len )
152151 ZEND_PARSE_PARAMETERS_END ();
153152
154153 if ( OUTSIDE_STRING (loffset , haystack_len ) ) {
@@ -272,7 +271,7 @@ PHP_FUNCTION(grapheme_strripos)
272271 Z_PARAM_STRING (needle , needle_len )
273272 Z_PARAM_OPTIONAL
274273 Z_PARAM_LONG (loffset )
275- Z_PARAM_STRING_OR_NULL (locale , locale_len )
274+ Z_PARAM_STRING (locale , locale_len )
276275 ZEND_PARSE_PARAMETERS_END ();
277276
278277 if ( OUTSIDE_STRING (loffset , haystack_len ) ) {
@@ -553,15 +552,14 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas
553552 Z_PARAM_STRING (needle , needle_len )
554553 Z_PARAM_OPTIONAL
555554 Z_PARAM_BOOL (part )
556- Z_PARAM_STRING_OR_NULL (locale , locale_len )
555+ Z_PARAM_STRING (locale , locale_len )
557556 ZEND_PARSE_PARAMETERS_END ();
558557 } else {
559558 ZEND_PARSE_PARAMETERS_START (2 , 3 )
560559 Z_PARAM_STRING (haystack , haystack_len )
561560 Z_PARAM_STRING (needle , needle_len )
562561 Z_PARAM_OPTIONAL
563562 Z_PARAM_BOOL (part )
564- Z_PARAM_STRING_OR_NULL (locale , locale_len )
565563 ZEND_PARSE_PARAMETERS_END ();
566564 }
567565
@@ -944,7 +942,7 @@ PHP_FUNCTION(grapheme_levenshtein)
944942 Z_PARAM_LONG (cost_ins )
945943 Z_PARAM_LONG (cost_rep )
946944 Z_PARAM_LONG (cost_del )
947- Z_PARAM_STRING_OR_NULL (locale , locale_len )
945+ Z_PARAM_STRING (locale , locale_len )
948946 ZEND_PARSE_PARAMETERS_END ();
949947
950948 if (cost_ins <= 0 || cost_ins > UINT_MAX / 4 ) {
0 commit comments