@@ -607,7 +607,7 @@ PHP_FUNCTION(mb_eregi)
607
607
/* {{{ _php_mb_regex_ereg_replace_exec */
608
608
static void _php_mb_regex_ereg_replace_exec (INTERNAL_FUNCTION_PARAMETERS , OnigOptionType options )
609
609
{
610
- zval * arg_pattern_zval ;
610
+ zval * * arg_pattern_zval ;
611
611
612
612
char * arg_pattern ;
613
613
int arg_pattern_len ;
@@ -647,7 +647,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
647
647
char * option_str = NULL ;
648
648
int option_str_len = 0 ;
649
649
650
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "zss |s" ,
650
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "Zss |s" ,
651
651
& arg_pattern_zval ,
652
652
& replace , & replace_len ,
653
653
& string , & string_len ,
@@ -662,13 +662,13 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
662
662
syntax = MBSTRG (regex_default_syntax );
663
663
}
664
664
}
665
- if (Z_TYPE_P (arg_pattern_zval ) == IS_STRING ) {
666
- arg_pattern = Z_STRVAL_P (arg_pattern_zval );
667
- arg_pattern_len = Z_STRLEN_P (arg_pattern_zval );
665
+ if (Z_TYPE_PP (arg_pattern_zval ) == IS_STRING ) {
666
+ arg_pattern = Z_STRVAL_PP (arg_pattern_zval );
667
+ arg_pattern_len = Z_STRLEN_PP (arg_pattern_zval );
668
668
} else {
669
669
/* FIXME: this code is not multibyte aware! */
670
- convert_to_long_ex (& arg_pattern_zval );
671
- pat_buf [0 ] = (char )Z_LVAL_P (arg_pattern_zval );
670
+ convert_to_long_ex (arg_pattern_zval );
671
+ pat_buf [0 ] = (char )Z_LVAL_PP (arg_pattern_zval );
672
672
pat_buf [1 ] = '\0' ;
673
673
674
674
arg_pattern = pat_buf ;
0 commit comments