felipe Sat Jun 21 18:16:02 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ereg ereg.c /php-src/ext/ereg/tests ereg_error_001.phpt ereg_replace_error_001.phpt ereg_replace_variation_003.phpt ereg_variation_002.phpt eregi_error_001.phpt eregi_replace_error_001.phpt eregi_replace_variation_003.phpt eregi_variation_002.phpt split_error_001.phpt split_error_002.phpt split_variation_001.phpt split_variation_002.phpt split_variation_003.phpt spliti_error_001.phpt spliti_error_002.phpt spliti_variation_001.phpt spliti_variation_002.phpt spliti_variation_003.phpt sql_regcase_error_001.phpt sql_regcase_variation_001.phpt Log: - New parameter parsing API
http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/ereg.c?r1=1.90.2.5&r2=1.90.2.6&diff_format=u Index: php-src/ext/ereg/ereg.c diff -u php-src/ext/ereg/ereg.c:1.90.2.5 php-src/ext/ereg/ereg.c:1.90.2.6 --- php-src/ext/ereg/ereg.c:1.90.2.5 Sun Apr 20 01:44:16 2008 +++ php-src/ext/ereg/ereg.c Sat Jun 21 18:16:02 2008 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: ereg.c,v 1.90.2.5 2008/04/20 01:44:16 felipe Exp $ */ +/* $Id: ereg.c,v 1.90.2.6 2008/06/21 18:16:02 felipe Exp $ */ #include <stdio.h> #include <ctype.h> @@ -265,8 +265,9 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) { zval **regex, /* Regular expression */ - **findin, /* String to apply expression to */ **array = NULL; /* Optional register array */ + char *findin; /* String to apply expression to */ + int findin_len; regex_t re; regmatch_t *subs; int err, match_len, string_len; @@ -276,25 +277,27 @@ char *buf = NULL; char *string = NULL; int argc = ZEND_NUM_ARGS(); - - if (argc < 2 || argc > 3 || - zend_get_parameters_ex(argc, ®ex, &findin, &array) == FAILURE) { - WRONG_PARAM_COUNT; + + if (zend_parse_parameters(argc TSRMLS_CC, "Zs|Z", ®ex, &findin, &findin_len, &array) == FAILURE) { + return; } - if (icase) + if (icase) { copts |= REG_ICASE; + } - if (argc == 2) + if (argc == 2) { copts |= REG_NOSUB; + } /* compile the regular expression from the supplied regex */ if (Z_TYPE_PP(regex) == IS_STRING) { err = regcomp(&re, Z_STRVAL_PP(regex), REG_EXTENDED | copts); } else { /* we convert numbers to integers and treat them as a string */ - if (Z_TYPE_PP(regex) == IS_DOUBLE) + if (Z_TYPE_PP(regex) == IS_DOUBLE) { convert_to_long_ex(regex); /* get rid of decimal places */ + } convert_to_string_ex(regex); /* don't bother doing an extended regex with just a number */ err = regcomp(&re, Z_STRVAL_PP(regex), copts); @@ -306,8 +309,7 @@ } /* make a copy of the string we're looking in */ - convert_to_string_ex(findin); - string = estrndup(Z_STRVAL_PP(findin), Z_STRLEN_PP(findin)); + string = estrndup(findin, findin_len); /* allocate storage for (sub-)expression-matches */ subs = (regmatch_t *)ecalloc(sizeof(regmatch_t),re.re_nsub+1); @@ -324,7 +326,7 @@ if (array && err != REG_NOMATCH) { match_len = (int) (subs[0].rm_eo - subs[0].rm_so); - string_len = Z_STRLEN_PP(findin) + 1; + string_len = findin_len + 1; buf = emalloc(string_len); @@ -523,23 +525,23 @@ static void php_do_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) { zval **arg_pattern, - **arg_replace, - **arg_string; - char *pattern; + **arg_replace; + char *pattern, *arg_string; char *string; char *replace; char *ret; + int arg_string_len; - if (ZEND_NUM_ARGS() != 3 || - zend_get_parameters_ex(3, &arg_pattern, &arg_replace, &arg_string) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZs", &arg_pattern, &arg_replace, &arg_string, &arg_string_len) == FAILURE) { + return; } if (Z_TYPE_PP(arg_pattern) == IS_STRING) { - if (Z_STRVAL_PP(arg_pattern) && Z_STRLEN_PP(arg_pattern)) + if (Z_STRVAL_PP(arg_pattern) && Z_STRLEN_PP(arg_pattern)) { pattern = estrndup(Z_STRVAL_PP(arg_pattern), Z_STRLEN_PP(arg_pattern)); - else + } else { pattern = STR_EMPTY_ALLOC(); + } } else { convert_to_long_ex(arg_pattern); pattern = emalloc(2); @@ -548,10 +550,11 @@ } if (Z_TYPE_PP(arg_replace) == IS_STRING) { - if (Z_STRVAL_PP(arg_replace) && Z_STRLEN_PP(arg_replace)) + if (Z_STRVAL_PP(arg_replace) && Z_STRLEN_PP(arg_replace)) { replace = estrndup(Z_STRVAL_PP(arg_replace), Z_STRLEN_PP(arg_replace)); - else + } else { replace = STR_EMPTY_ALLOC(); + } } else { convert_to_long_ex(arg_replace); replace = emalloc(2); @@ -559,11 +562,11 @@ replace[1] = '\0'; } - convert_to_string_ex(arg_string); - if (Z_STRVAL_PP(arg_string) && Z_STRLEN_PP(arg_string)) - string = estrndup(Z_STRVAL_PP(arg_string), Z_STRLEN_PP(arg_string)); - else + if (arg_string && arg_string_len) { + string = estrndup(arg_string, arg_string_len); + } else { string = STR_EMPTY_ALLOC(); + } /* do the actual work */ ret = php_ereg_replace(pattern, replace, string, icase, 1); @@ -600,33 +603,30 @@ */ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) { - zval **spliton, **str, **arg_count = NULL; + long arg_count; regex_t re; regmatch_t subs[1]; - char *strp, *endp; + char *spliton, *str, *strp, *endp; + int spliton_len, str_len; int err, size, count = -1, copts = 0; int argc = ZEND_NUM_ARGS(); - if (argc < 2 || argc > 3 || - zend_get_parameters_ex(argc, &spliton, &str, &arg_count) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &spliton, &spliton_len, &str, &str_len, &arg_count) == FAILURE) { + return; } if (argc > 2) { - convert_to_long_ex(arg_count); - count = Z_LVAL_PP(arg_count); + count = arg_count; } - if (icase) + if (icase) { copts = REG_ICASE; + } - convert_to_string_ex(spliton); - convert_to_string_ex(str); - - strp = Z_STRVAL_PP(str); - endp = strp + Z_STRLEN_PP(str); + strp = str; + endp = strp + str_len; - err = regcomp(&re, Z_STRVAL_PP(spliton), REG_EXTENDED | copts); + err = regcomp(&re, spliton, REG_EXTENDED | copts); if (err) { php_ereg_eprint(err, &re); RETURN_FALSE; @@ -710,21 +710,20 @@ Make regular expression for case insensitive match */ PHPAPI PHP_FUNCTION(sql_regcase) { - zval **string; - char *tmp; + char *string, *tmp; + int string_len; unsigned char c; register int i, j; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &string_len) == FAILURE) { + return; + } - if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &string)==FAILURE) { - WRONG_PARAM_COUNT; - } - convert_to_string_ex(string); - - tmp = safe_emalloc(Z_STRLEN_PP(string), 4, 1); + tmp = safe_emalloc(string_len, 4, 1); - for (i = j = 0; i < Z_STRLEN_PP(string); i++) { - c = (unsigned char) Z_STRVAL_PP(string)[i]; - if(isalpha(c)) { + for (i = j = 0; i < string_len; i++) { + c = (unsigned char) string[i]; + if (isalpha(c)) { tmp[j++] = '['; tmp[j++] = toupper(c); tmp[j++] = tolower(c); http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/ereg_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/ereg_error_001.phpt diff -u php-src/ext/ereg/tests/ereg_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/ereg_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/ereg_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/ereg_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -35,11 +35,11 @@ -- Testing ereg() function with more than expected no. of arguments -- -Warning: Wrong parameter count for ereg() in %s on line 21 +Warning: ereg() expects at most 3 parameters, 4 given in %s on line 21 NULL -- Testing ereg() function with less than expected no. of arguments -- -Warning: Wrong parameter count for ereg() in %s on line 26 +Warning: ereg() expects at least 2 parameters, 1 given in %s on line 26 NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/ereg_replace_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/ereg_replace_error_001.phpt diff -u php-src/ext/ereg/tests/ereg_replace_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/ereg_replace_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/ereg_replace_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/ereg_replace_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -32,11 +32,11 @@ -- Testing ereg_replace() function with more than expected no. of arguments -- -Warning: Wrong parameter count for ereg_replace() in %s on line 17 +Warning: ereg_replace() expects exactly 3 parameters, 4 given in %s on line 17 NULL -- Testing ereg_replace() function with less than expected no. of arguments -- -Warning: Wrong parameter count for ereg_replace() in %s on line 23 +Warning: ereg_replace() expects exactly 3 parameters, 2 given in %s on line 23 NULL -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/ereg_replace_variation_003.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/ereg_replace_variation_003.phpt diff -u php-src/ext/ereg/tests/ereg_replace_variation_003.phpt:1.1.2.2 php-src/ext/ereg/tests/ereg_replace_variation_003.phpt:1.1.2.3 --- php-src/ext/ereg/tests/ereg_replace_variation_003.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/ereg_replace_variation_003.phpt Sat Jun 21 18:16:02 2008 @@ -112,24 +112,24 @@ string(3) "0.5" Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - ereg_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - ereg_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - ereg_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - ereg_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - ereg_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value string(0) "" @@ -157,13 +157,12 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -string(6) "Object" +Error: 2 - ereg_replace() expects parameter 3 to be string, object given, %s(74) +NULL Arg value string(0) "" Arg value string(0) "" -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/ereg_variation_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/ereg_variation_002.phpt diff -u php-src/ext/ereg/tests/ereg_variation_002.phpt:1.1.2.2 php-src/ext/ereg/tests/ereg_variation_002.phpt:1.1.2.3 --- php-src/ext/ereg/tests/ereg_variation_002.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/ereg_variation_002.phpt Sat Jun 21 18:16:02 2008 @@ -112,24 +112,24 @@ bool(false) Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - ereg() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - ereg() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - ereg() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - ereg() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - ereg() expects parameter 2 to be string, array given, %s(74) +NULL Arg value bool(false) @@ -157,13 +157,12 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -bool(false) +Error: 2 - ereg() expects parameter 2 to be string, object given, %s(74) +NULL Arg value bool(false) Arg value bool(false) -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/eregi_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/eregi_error_001.phpt diff -u php-src/ext/ereg/tests/eregi_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/eregi_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/eregi_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/eregi_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -35,11 +35,11 @@ -- Testing eregi() function with more than expected no. of arguments -- -Warning: Wrong parameter count for eregi() in %s on line 21 +Warning: eregi() expects at most 3 parameters, 4 given in %s on line 21 NULL -- Testing eregi() function with less than expected no. of arguments -- -Warning: Wrong parameter count for eregi() in %s on line 26 +Warning: eregi() expects at least 2 parameters, 1 given in %s on line 26 NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/eregi_replace_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/eregi_replace_error_001.phpt diff -u php-src/ext/ereg/tests/eregi_replace_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/eregi_replace_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/eregi_replace_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/eregi_replace_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -32,11 +32,11 @@ -- Testing eregi_replace() function with more than expected no. of arguments -- -Warning: Wrong parameter count for eregi_replace() in %s on line 17 +Warning: eregi_replace() expects exactly 3 parameters, 4 given in %s on line 17 NULL -- Testing eregi_replace() function with less than expected no. of arguments -- -Warning: Wrong parameter count for eregi_replace() in %s on line 23 +Warning: eregi_replace() expects exactly 3 parameters, 2 given in %s on line 23 NULL -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/eregi_replace_variation_003.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/eregi_replace_variation_003.phpt diff -u php-src/ext/ereg/tests/eregi_replace_variation_003.phpt:1.1.2.2 php-src/ext/ereg/tests/eregi_replace_variation_003.phpt:1.1.2.3 --- php-src/ext/ereg/tests/eregi_replace_variation_003.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/eregi_replace_variation_003.phpt Sat Jun 21 18:16:02 2008 @@ -112,24 +112,24 @@ string(3) "0.5" Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - eregi_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - eregi_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - eregi_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - eregi_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -string(5) "Array" +Error: 2 - eregi_replace() expects parameter 3 to be string, array given, %s(74) +NULL Arg value string(0) "" @@ -157,13 +157,12 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -string(6) "Object" +Error: 2 - eregi_replace() expects parameter 3 to be string, object given, %s(74) +NULL Arg value string(0) "" Arg value string(0) "" -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/eregi_variation_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/eregi_variation_002.phpt diff -u php-src/ext/ereg/tests/eregi_variation_002.phpt:1.1.2.2 php-src/ext/ereg/tests/eregi_variation_002.phpt:1.1.2.3 --- php-src/ext/ereg/tests/eregi_variation_002.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/eregi_variation_002.phpt Sat Jun 21 18:16:02 2008 @@ -112,24 +112,24 @@ bool(false) Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - eregi() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - eregi() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - eregi() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - eregi() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -bool(false) +Error: 2 - eregi() expects parameter 2 to be string, array given, %s(74) +NULL Arg value bool(false) @@ -157,13 +157,12 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -bool(false) +Error: 2 - eregi() expects parameter 2 to be string, object given, %s(74) +NULL Arg value bool(false) Arg value bool(false) -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/split_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/split_error_001.phpt diff -u php-src/ext/ereg/tests/split_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/split_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/split_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/split_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -31,11 +31,11 @@ -- Testing split() function with more than expected no. of arguments -- -Warning: Wrong parameter count for split() in %s on line 17 +Warning: split() expects at most 3 parameters, 4 given in %s on line 17 NULL -- Testing split() function with less than expected no. of arguments -- -Warning: Wrong parameter count for split() in %s on line 22 +Warning: split() expects at least 2 parameters, 1 given in %s on line 22 NULL -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/split_error_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/split_error_002.phpt diff -u php-src/ext/ereg/tests/split_error_002.phpt:1.1.2.2 php-src/ext/ereg/tests/split_error_002.phpt:1.1.2.3 --- php-src/ext/ereg/tests/split_error_002.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/split_error_002.phpt Sat Jun 21 18:16:02 2008 @@ -61,8 +61,8 @@ Warning: split(): REG_BADRPT in %s on line 22 bool(false) -Warning: split(): REG_BADRPT in %s on line 23 -bool(false) +Warning: split() expects parameter 3 to be long, string given in %s on line 23 +NULL Warning: split(): REG_BADBR in %s on line 24 bool(false) @@ -82,7 +82,7 @@ Warning: split(): REG_EESCAPE in %s on line 29 bool(false) -Warning: split(): REG_ERANGE in %s on line 30 -bool(false) +Warning: split() expects parameter 3 to be long, string given in %s on line 30 +NULL string(8) "original" -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/split_variation_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/split_variation_001.phpt diff -u php-src/ext/ereg/tests/split_variation_001.phpt:1.1.2.2 php-src/ext/ereg/tests/split_variation_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/split_variation_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/split_variation_001.phpt Sat Jun 21 18:16:02 2008 @@ -145,49 +145,24 @@ } Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - split() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - split() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - split() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - split() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - split() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Error: 2 - split(): REG_EMPTY, %s(74) @@ -239,12 +214,8 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -array(1) { - [0]=> - string(16) "1 a 1 Array 1 c " -} +Error: 2 - split() expects parameter 1 to be string, object given, %s(74) +NULL Arg value Error: 2 - split(): REG_EMPTY, %s(74) @@ -253,4 +224,4 @@ Arg value Error: 2 - split(): REG_EMPTY, %s(74) bool(false) -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/split_variation_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/split_variation_002.phpt diff -u php-src/ext/ereg/tests/split_variation_002.phpt:1.1.2.2 php-src/ext/ereg/tests/split_variation_002.phpt:1.1.2.3 --- php-src/ext/ereg/tests/split_variation_002.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/split_variation_002.phpt Sat Jun 21 18:16:02 2008 @@ -141,59 +141,24 @@ } Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - split() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - split() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - split() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - split() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - split() expects parameter 2 to be string, array given, %s(74) +NULL Arg value array(1) { @@ -245,14 +210,8 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -array(2) { - [0]=> - string(2) "Ob" - [1]=> - string(3) "ect" -} +Error: 2 - split() expects parameter 2 to be string, object given, /home/felipe/php5/ext/ereg/tests/split_variation_002.php(74) +NULL Arg value array(1) { http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/split_variation_003.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/ereg/tests/split_variation_003.phpt diff -u php-src/ext/ereg/tests/split_variation_003.phpt:1.1.2.3 php-src/ext/ereg/tests/split_variation_003.phpt:1.1.2.4 --- php-src/ext/ereg/tests/split_variation_003.phpt:1.1.2.3 Tue Apr 22 15:31:57 2008 +++ php-src/ext/ereg/tests/split_variation_003.phpt Sat Jun 21 18:16:02 2008 @@ -114,34 +114,24 @@ } Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, array given, %s(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, array given, %s(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, array given, %s(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, array given, %s(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, array given, %s(73) +NULL Arg value array(1) { @@ -180,36 +170,25 @@ } Arg value -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, string given, %s(73) +NULL Arg value -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, string given, %s(73) +NULL Arg value string -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, string given, %s(73) +NULL Arg value string -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, string given, %s(73) +NULL Error: 4096 - Object of class stdClass could not be converted to string, %s(72) Arg value -Error: 8 - Object of class stdClass could not be converted to int, %s(73) -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - split() expects parameter 3 to be long, object given, %s(73) +NULL Arg value array(1) { @@ -222,4 +201,4 @@ [0]=> string(9) "1 2 3 4 5" } -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/spliti_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/spliti_error_001.phpt diff -u php-src/ext/ereg/tests/spliti_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/spliti_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/spliti_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/spliti_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -31,11 +31,11 @@ -- Testing spliti() function with more than expected no. of arguments -- -Warning: Wrong parameter count for spliti() in %s on line 17 +Warning: spliti() expects at most 3 parameters, 4 given in %s on line %d NULL -- Testing spliti() function with less than expected no. of arguments -- -Warning: Wrong parameter count for spliti() in %s on line 22 +Warning: spliti() expects at least 2 parameters, 1 given in %s on line %d NULL -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/spliti_error_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/spliti_error_002.phpt diff -u php-src/ext/ereg/tests/spliti_error_002.phpt:1.1.2.2 php-src/ext/ereg/tests/spliti_error_002.phpt:1.1.2.3 --- php-src/ext/ereg/tests/spliti_error_002.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/spliti_error_002.phpt Sat Jun 21 18:16:02 2008 @@ -61,8 +61,8 @@ Warning: spliti(): REG_BADRPT in %s on line 22 bool(false) -Warning: spliti(): REG_BADRPT in %s on line 23 -bool(false) +Warning: spliti() expects parameter 3 to be long, string given in %s on line %d +NULL Warning: spliti(): REG_BADBR in %s on line 24 bool(false) @@ -82,7 +82,7 @@ Warning: spliti(): REG_EESCAPE in %s on line 29 bool(false) -Warning: spliti(): REG_ERANGE in %s on line 30 -bool(false) +Warning: spliti() expects parameter 3 to be long, string given in %s on line %d +NULL string(8) "original" -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/spliti_variation_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/spliti_variation_001.phpt diff -u php-src/ext/ereg/tests/spliti_variation_001.phpt:1.1.2.2 php-src/ext/ereg/tests/spliti_variation_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/spliti_variation_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/spliti_variation_001.phpt Sat Jun 21 18:16:02 2008 @@ -145,49 +145,24 @@ } Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - spliti() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - spliti() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - spliti() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - spliti() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(2) { - [0]=> - string(6) "1 a 1 " - [1]=> - string(5) " 1 c " -} +Error: 2 - spliti() expects parameter 1 to be string, array given, %s(74) +NULL Arg value Error: 2 - spliti(): REG_EMPTY, %s(74) @@ -239,12 +214,8 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -array(1) { - [0]=> - string(16) "1 a 1 Array 1 c " -} +Error: 2 - spliti() expects parameter 1 to be string, object given, %s(74) +NULL Arg value Error: 2 - spliti(): REG_EMPTY, %s(74) @@ -253,4 +224,4 @@ Arg value Error: 2 - spliti(): REG_EMPTY, %s(74) bool(false) -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/spliti_variation_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/spliti_variation_002.phpt diff -u php-src/ext/ereg/tests/spliti_variation_002.phpt:1.1.2.2 php-src/ext/ereg/tests/spliti_variation_002.phpt:1.1.2.3 --- php-src/ext/ereg/tests/spliti_variation_002.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/spliti_variation_002.phpt Sat Jun 21 18:16:02 2008 @@ -141,59 +141,24 @@ } Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - spliti() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - spliti() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - spliti() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - spliti() expects parameter 2 to be string, array given, %s(74) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(74) -array(3) { - [0]=> - string(1) "A" - [1]=> - string(0) "" - [2]=> - string(2) "ay" -} +Error: 2 - spliti() expects parameter 2 to be string, array given, %s(74) +NULL Arg value array(1) { @@ -245,16 +210,8 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(73) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(74) -Error: 8 - Object of class stdClass to string conversion, %s(74) -array(3) { - [0]=> - string(2) "Ob" - [1]=> - string(0) "" - [2]=> - string(2) "ct" -} +Error: 2 - spliti() expects parameter 2 to be string, object given, %s(74) +NULL Arg value array(1) { http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/spliti_variation_003.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/ereg/tests/spliti_variation_003.phpt diff -u php-src/ext/ereg/tests/spliti_variation_003.phpt:1.1.2.3 php-src/ext/ereg/tests/spliti_variation_003.phpt:1.1.2.4 --- php-src/ext/ereg/tests/spliti_variation_003.phpt:1.1.2.3 Tue Apr 22 15:31:57 2008 +++ php-src/ext/ereg/tests/spliti_variation_003.phpt Sat Jun 21 18:16:02 2008 @@ -114,34 +114,24 @@ } Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, array given, %s.php(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, array given, %s.php(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, array given, %s.php(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, array given, %s.php(73) +NULL Arg value Array -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, array given, %s.php(73) +NULL Arg value array(1) { @@ -180,36 +170,25 @@ } Arg value -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, string given, %s(73) +NULL Arg value -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, string given, %s(73) +NULL Arg value string -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, string given, %s(73) +NULL Arg value string -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, string given, %s(73) +NULL Error: 4096 - Object of class stdClass could not be converted to string, %s(72) Arg value -Error: 8 - Object of class stdClass could not be converted to int, %s(73) -array(1) { - [0]=> - string(9) "1 2 3 4 5" -} +Error: 2 - spliti() expects parameter 3 to be long, object given, %s(73) +NULL Arg value array(1) { @@ -222,4 +201,4 @@ [0]=> string(9) "1 2 3 4 5" } -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/sql_regcase_error_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/sql_regcase_error_001.phpt diff -u php-src/ext/ereg/tests/sql_regcase_error_001.phpt:1.1.2.2 php-src/ext/ereg/tests/sql_regcase_error_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/sql_regcase_error_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/sql_regcase_error_001.phpt Sat Jun 21 18:16:02 2008 @@ -27,11 +27,11 @@ -- Testing sql_regcase() function with Zero arguments -- -Warning: Wrong parameter count for sql_regcase() in %s on line 12 +Warning: sql_regcase() expects exactly 1 parameter, 0 given in %s.php on line 12 NULL -- Testing sql_regcase() function with more than expected no. of arguments -- -Warning: Wrong parameter count for sql_regcase() in %s on line 18 +Warning: sql_regcase() expects exactly 1 parameter, 2 given in %s.php on line 18 NULL -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/tests/sql_regcase_variation_001.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/ereg/tests/sql_regcase_variation_001.phpt diff -u php-src/ext/ereg/tests/sql_regcase_variation_001.phpt:1.1.2.2 php-src/ext/ereg/tests/sql_regcase_variation_001.phpt:1.1.2.3 --- php-src/ext/ereg/tests/sql_regcase_variation_001.phpt:1.1.2.2 Fri Apr 11 08:57:16 2008 +++ php-src/ext/ereg/tests/sql_regcase_variation_001.phpt Sat Jun 21 18:16:02 2008 @@ -110,24 +110,24 @@ string(3) "0.5" Arg value Array -Error: 8 - Array to string conversion, %s(72) -string(20) "[Aa][Rr][Rr][Aa][Yy]" +Error: 2 - sql_regcase() expects parameter 1 to be string, array given, %s.php(72) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(72) -string(20) "[Aa][Rr][Rr][Aa][Yy]" +Error: 2 - sql_regcase() expects parameter 1 to be string, array given, %s.php(72) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(72) -string(20) "[Aa][Rr][Rr][Aa][Yy]" +Error: 2 - sql_regcase() expects parameter 1 to be string, array given, %s.php(72) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(72) -string(20) "[Aa][Rr][Rr][Aa][Yy]" +Error: 2 - sql_regcase() expects parameter 1 to be string, array given, %s.php(72) +NULL Arg value Array -Error: 8 - Array to string conversion, %s(72) -string(20) "[Aa][Rr][Rr][Aa][Yy]" +Error: 2 - sql_regcase() expects parameter 1 to be string, array given, %s.php(72) +NULL Arg value string(0) "" @@ -155,13 +155,12 @@ Error: 4096 - Object of class stdClass could not be converted to string, %s(71) Arg value -Error: 4096 - Object of class stdClass could not be converted to string, %s(72) -Error: 8 - Object of class stdClass to string conversion, %s(72) -string(24) "[Oo][Bb][Jj][Ee][Cc][Tt]" +Error: 2 - sql_regcase() expects parameter 1 to be string, object given, %s.php(72) +NULL Arg value string(0) "" Arg value string(0) "" -Done \ No newline at end of file +Done
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php