moriyoshi Sun Feb 15 07:04:07 2009 UTC Modified files: /php-src/ext/mbstring mbstring.c /php-src/ext/mbstring/libmbfl/mbfl mbfilter.c /php-src/ext/mbstring/tests bug43840.phpt bug43841.phpt mb_stripos_variation2.phpt mb_stripos_variation3.phpt mb_stripos_variation5_Bug45923.phpt mb_stristr_variation2.phpt mb_strpos_variation2.phpt mb_strpos_variation3.phpt mb_strpos_variation5.phpt mb_strripos_variation3_Bug45923.phpt mb_strripos_variation5_Bug45923.phpt mb_strrpos_variation3.phpt mb_strrpos_variation5.phpt mb_strstr_variation2.phpt mb_substr_count_variation2.phpt Log: - Refix bug #43840. - Fix bug #43841. - Remove redundant trailing dots from the error messages. - Fix tests.
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.315&r2=1.316&diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.315 php-src/ext/mbstring/mbstring.c:1.316 --- php-src/ext/mbstring/mbstring.c:1.315 Sat Feb 14 07:33:41 2009 +++ php-src/ext/mbstring/mbstring.c Sun Feb 15 07:04:06 2009 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.315 2009/02/14 07:33:41 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.316 2009/02/15 07:04:06 moriyoshi Exp $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -2080,7 +2080,7 @@ RETURN_FALSE; } if (needle.len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } @@ -2223,7 +2223,7 @@ RETURN_FALSE; } if (needle.len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } n = php_mb_stripos(0, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, offset, from_encoding TSRMLS_CC); @@ -2292,7 +2292,7 @@ } if (needle.len <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } n = mbfl_strpos(&haystack, &needle, 0, 0); @@ -2402,7 +2402,7 @@ } if (!needle.len) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty delimiter."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter"); RETURN_FALSE; } @@ -2521,7 +2521,7 @@ } if (needle.len <= 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty substring."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty substring"); RETURN_FALSE; } http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c?r1=1.18&r2=1.19&diff_format=u Index: php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c diff -u php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.18 php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.19 --- php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.18 Sat Feb 14 08:15:46 2009 +++ php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c Sun Feb 15 07:04:07 2009 @@ -778,7 +778,7 @@ for (;;) { pc->found_pos++; p = h; - m = pc->needle.buffer; + m = (int *)pc->needle.buffer; n = pc->needle_pos - 1; while (n > 0 && *p == *m) { n--; @@ -857,87 +857,203 @@ int offset, int reverse) { - int n, result, negative_offset = 0; - unsigned char *p; - mbfl_convert_filter *filter; - struct collector_strpos_data pc; + int result; + mbfl_string _haystack_u8, _needle_u8; + const mbfl_string *haystack_u8, *needle_u8; + const unsigned char *u8_tbl; - if (haystack == NULL || needle == NULL) { + if (haystack == NULL || haystack->val == NULL || needle == NULL || needle->val == NULL) { return -8; } - /* needle is converted into wchar */ - mbfl_wchar_device_init(&pc.needle); - filter = mbfl_convert_filter_new( - needle->no_encoding, - mbfl_no_encoding_wchar, - mbfl_wchar_device_output, 0, &pc.needle); - if (filter == NULL) { - return -4; + + { + const mbfl_encoding *u8_enc; + u8_enc = mbfl_no2encoding(mbfl_no_encoding_utf8); + if (u8_enc == NULL || u8_enc->mblen_table == NULL) { + return -8; + } + u8_tbl = u8_enc->mblen_table; } - p = needle->val; - n = needle->len; - if (p != NULL) { - while (n > 0) { - if ((*filter->filter_function)(*p++, filter) < 0) { - break; - } - n--; + + if (haystack->no_encoding != mbfl_no_encoding_utf8) { + mbfl_string_init(&_haystack_u8); + haystack_u8 = mbfl_convert_encoding(haystack, &_haystack_u8, mbfl_no_encoding_utf8); + if (haystack_u8 == NULL) { + result = -4; + goto out; } - } - mbfl_convert_filter_flush(filter); - mbfl_convert_filter_delete(filter); - pc.needle_len = pc.needle.pos; - if (pc.needle.buffer == NULL) { - return -4; - } - if (pc.needle_len <= 0) { - mbfl_wchar_device_clear(&pc.needle); - return -2; - } - /* initialize filter and collector data */ - filter = mbfl_convert_filter_new( - haystack->no_encoding, - mbfl_no_encoding_wchar, - collector_strpos, 0, &pc); - if (filter == NULL) { - mbfl_wchar_device_clear(&pc.needle); - return -4; + } else { + haystack_u8 = haystack; } - if (offset < 0) { - negative_offset = -offset - pc.needle_len; - if (negative_offset < 0) { - negative_offset = 0; + if (needle->no_encoding != mbfl_no_encoding_utf8) { + mbfl_string_init(&_needle_u8); + needle_u8 = mbfl_convert_encoding(needle, &_needle_u8, mbfl_no_encoding_utf8); + if (needle_u8 == NULL) { + result = -4; + goto out; } - offset = 0; + } else { + needle_u8 = needle; } - pc.start = offset; - pc.output = 0; - pc.needle_pos = 0; - pc.found_pos = 0; - pc.matched_pos = -1; + if (needle_u8->len < 1) { + result = -8; + goto out; + } - /* feed data */ - p = haystack->val; - n = haystack->len - negative_offset; - if (p != NULL) { - while (n > 0) { - if ((*filter->filter_function)(*p++, filter) < 0) { - pc.matched_pos = -4; - break; + result = -1; + if (haystack_u8->len < needle_u8->len) { + goto out; + } + + if (!reverse) { + unsigned int jtbl[1 << (sizeof(unsigned char) * 8)]; + unsigned int needle_u8_len = needle_u8->len; + unsigned int i; + const unsigned char *p, *q, *e; + const unsigned char *haystack_u8_val = haystack_u8->val, + *needle_u8_val = needle_u8->val; + for (i = 0; i < sizeof(jtbl) / sizeof(*jtbl); ++i) { + jtbl[i] = needle_u8_len + 1; + } + for (i = 0; i < needle_u8_len - 1; ++i) { + jtbl[needle_u8_val[i]] = needle_u8_len - i; + } + e = haystack_u8_val + haystack_u8->len; + p = haystack_u8_val; + while (--offset >= 0) { + if (p >= e) { + result = -16; + goto out; } - if (pc.matched_pos >= 0 && !reverse) { - break; + p += u8_tbl[*p]; + } + p += needle_u8_len; + if (p > e) { + goto out; + } + while (p <= e) { + const unsigned char *pv = p; + q = needle_u8_val + needle_u8_len; + for (;;) { + if (q == needle_u8_val) { + result = 0; + while (p > haystack_u8_val) { + unsigned char c = *--p; + if (c < 0x80) { + ++result; + } else if ((c & 0xc0) != 0x80) { + ++result; + } + } + goto out; + } + if (*--q != *--p) { + break; + } + } + p += jtbl[*p]; + if (p <= pv) { + p = pv + 1; + } + } + } else { + unsigned int jtbl[1 << (sizeof(unsigned char) * 8)]; + unsigned int needle_u8_len = needle_u8->len, needle_len = 0; + unsigned int i; + const unsigned char *p, *e, *q, *qe; + const unsigned char *haystack_u8_val = haystack_u8->val, + *needle_u8_val = needle_u8->val; + for (i = 0; i < sizeof(jtbl) / sizeof(*jtbl); ++i) { + jtbl[i] = needle_u8_len; + } + for (i = needle_u8_len - 1; i > 0; --i) { + unsigned char c = needle_u8_val[i]; + jtbl[c] = i; + if (c < 0x80) { + ++needle_len; + } else if ((c & 0xc0) != 0x80) { + ++needle_len; + } + } + { + unsigned char c = needle_u8_val[0]; + if (c < 0x80) { + ++needle_len; + } else if ((c & 0xc0) != 0x80) { + ++needle_len; + } + } + e = haystack_u8_val; + p = e + haystack_u8->len; + qe = needle_u8_val + needle_u8_len; + if (offset < 0) { + if (-offset > needle_len) { + offset += needle_len; + while (offset < 0) { + unsigned char c; + if (p <= e) { + result = -16; + goto out; + } + c = *(--p); + if (c < 0x80) { + ++offset; + } else if ((c & 0xc0) != 0x80) { + ++offset; + } + } + } + } else { + const unsigned char *ee = haystack_u8_val + haystack_u8->len; + while (--offset >= 0) { + if (e >= ee) { + result = -16; + goto out; + } + e += u8_tbl[*e]; + } + } + if (p < e + needle_u8_len) { + goto out; + } + p -= needle_u8_len; + while (p >= e) { + const unsigned char *pv = p; + q = needle_u8_val; + for (;;) { + if (q == qe) { + result = 0; + p -= needle_u8_len; + while (p > haystack_u8_val) { + unsigned char c = *--p; + if (c < 0x80) { + ++result; + } else if ((c & 0xc0) != 0x80) { + ++result; + } + } + goto out; + } + if (*q != *p) { + break; + } + ++p, ++q; + } + p -= jtbl[*p]; + if (p >= pv) { + p = pv - 1; } - n--; } } - mbfl_convert_filter_flush(filter); - result = pc.matched_pos; - mbfl_convert_filter_delete(filter); - mbfl_wchar_device_clear(&pc.needle); - +out: + if (haystack_u8 == &_haystack_u8) { + mbfl_string_clear(&_haystack_u8); + } + if (needle_u8 == &_needle_u8) { + mbfl_string_clear(&_needle_u8); + } return result; } http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/bug43840.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/bug43840.phpt diff -u php-src/ext/mbstring/tests/bug43840.phpt:1.2 php-src/ext/mbstring/tests/bug43840.phpt:1.3 --- php-src/ext/mbstring/tests/bug43840.phpt:1.2 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/bug43840.phpt Sun Feb 15 07:04:07 2009 @@ -46,27 +46,31 @@ -- Offset is 22 -- --Multibyte String:-- + +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --ASCII String:-- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) -- Offset is 53 -- --Multibyte String:-- + +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --ASCII String:-- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) -- Offset is 54 -- --Multibyte String:-- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --ASCII String:-- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/bug43841.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/mbstring/tests/bug43841.phpt diff -u php-src/ext/mbstring/tests/bug43841.phpt:1.1 php-src/ext/mbstring/tests/bug43841.phpt:1.2 --- php-src/ext/mbstring/tests/bug43841.phpt:1.1 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/bug43841.phpt Sun Feb 15 07:04:07 2009 @@ -1,6 +1,5 @@ --TEST-- Test mb_strrpos() function : mb_strrpos offset is byte count for negative values ---XFAIL-- --SKIPIF-- <?php extension_loaded('mbstring') or die('skip'); @@ -38,29 +37,37 @@ --EXPECTF-- -- Offset is -25 -- Multibyte String: + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) ASCII String: mb_strrpos: + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) strrpos: -Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d +Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Offset is -24 -- Multibyte String: -int(9) + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d +bool(false) ASCII String: mb_strrpos: + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) strrpos: -Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d +Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Offset is -13 -- Multibyte String: -int(9) +bool(false) ASCII String: mb_strrpos: bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_stripos_variation2.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/mb_stripos_variation2.phpt diff -u php-src/ext/mbstring/tests/mb_stripos_variation2.phpt:1.2 php-src/ext/mbstring/tests/mb_stripos_variation2.phpt:1.3 --- php-src/ext/mbstring/tests/mb_stripos_variation2.phpt:1.2 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_stripos_variation2.phpt Sun Feb 15 07:04:07 2009 @@ -136,12 +136,12 @@ -- Iteration 10 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 11 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 12 -- @@ -149,7 +149,7 @@ -- Iteration 13 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 14 -- @@ -157,17 +157,17 @@ -- Iteration 15 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 16 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 17 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 18 -- @@ -184,12 +184,12 @@ -- Iteration 22 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 23 -- -Warning: mb_stripos(): Empty delimiter. in %s on line %d +Warning: mb_stripos(): Empty delimiter in %s on line %d bool(false) -- Iteration 24 -- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_stripos_variation3.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/mb_stripos_variation3.phpt diff -u php-src/ext/mbstring/tests/mb_stripos_variation3.phpt:1.2 php-src/ext/mbstring/tests/mb_stripos_variation3.phpt:1.3 --- php-src/ext/mbstring/tests/mb_stripos_variation3.phpt:1.2 Fri Dec 5 13:13:15 2008 +++ php-src/ext/mbstring/tests/mb_stripos_variation3.phpt Sun Feb 15 07:04:07 2009 @@ -115,12 +115,12 @@ -- Iteration 3 -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 4 -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 5 -- @@ -128,12 +128,12 @@ -- Iteration 6 -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 7 -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 8 -- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt diff -u php-src/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt:1.2 php-src/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt:1.3 --- php-src/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt:1.2 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt Sun Feb 15 07:04:07 2009 @@ -51,11 +51,11 @@ **-- Offset is: -10 --** -- ASCII String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 0 --** @@ -79,35 +79,41 @@ **-- Offset is: 30 --** -- ASCII String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 40 --** -- ASCII String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 50 --** -- ASCII String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 60 --** -- ASCII String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- -Warning: mb_stripos(): Offset not contained in string. in %s on line %d +Warning: mb_stripos(): Offset not contained in string in %s on line %d bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_stristr_variation2.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mbstring/tests/mb_stristr_variation2.phpt diff -u php-src/ext/mbstring/tests/mb_stristr_variation2.phpt:1.3 php-src/ext/mbstring/tests/mb_stristr_variation2.phpt:1.4 --- php-src/ext/mbstring/tests/mb_stristr_variation2.phpt:1.3 Tue Dec 30 02:12:44 2008 +++ php-src/ext/mbstring/tests/mb_stristr_variation2.phpt Sun Feb 15 07:04:07 2009 @@ -165,38 +165,38 @@ bool(false) --uppercase NULL-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --lowercase null-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --lowercase true-- bool(false) --lowercase false-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --uppercase TRUE-- bool(false) --uppercase FALSE-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --empty string DQ-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --empty string SQ-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --instance of classWithToString-- Error: 4096 - Method classWithToString::__toString() must return a string value, %s(%d) -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --instance of classWithoutToString-- @@ -204,11 +204,11 @@ bool(false) --undefined var-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --unset var-- -Error: 2 - mb_stristr(): Empty delimiter., %s(%d) +Error: 2 - mb_stristr(): Empty delimiter, %s(%d) bool(false) --resource-- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strpos_variation2.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mbstring/tests/mb_strpos_variation2.phpt diff -u php-src/ext/mbstring/tests/mb_strpos_variation2.phpt:1.4 php-src/ext/mbstring/tests/mb_strpos_variation2.phpt:1.5 --- php-src/ext/mbstring/tests/mb_strpos_variation2.phpt:1.4 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_strpos_variation2.phpt Sun Feb 15 07:04:07 2009 @@ -135,12 +135,12 @@ -- Iteration 10 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 11 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 12 -- @@ -148,7 +148,7 @@ -- Iteration 13 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 14 -- @@ -156,17 +156,17 @@ -- Iteration 15 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 16 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 17 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 18 -- @@ -183,16 +183,16 @@ -- Iteration 22 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 23 -- -Warning: mb_strpos(): Empty delimiter. in %s on line %d +Warning: mb_strpos(): Empty delimiter in %s on line %d bool(false) -- Iteration 24 -- Warning: mb_strpos() expects parameter 2 to be binary string, resource given in %s on line %d bool(false) -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strpos_variation3.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mbstring/tests/mb_strpos_variation3.phpt diff -u php-src/ext/mbstring/tests/mb_strpos_variation3.phpt:1.4 php-src/ext/mbstring/tests/mb_strpos_variation3.phpt:1.5 --- php-src/ext/mbstring/tests/mb_strpos_variation3.phpt:1.4 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_strpos_variation3.phpt Sun Feb 15 07:04:07 2009 @@ -114,12 +114,12 @@ -- Iteration 3 -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 4 -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 5 -- @@ -127,12 +127,12 @@ -- Iteration 6 -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 7 -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) -- Iteration 8 -- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strpos_variation5.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mbstring/tests/mb_strpos_variation5.phpt diff -u php-src/ext/mbstring/tests/mb_strpos_variation5.phpt:1.3 php-src/ext/mbstring/tests/mb_strpos_variation5.phpt:1.4 --- php-src/ext/mbstring/tests/mb_strpos_variation5.phpt:1.3 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_strpos_variation5.phpt Sun Feb 15 07:04:07 2009 @@ -50,11 +50,11 @@ **-- Offset is: -10 --** -- ASCII String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 0 --** @@ -78,35 +78,41 @@ **-- Offset is: 30 --** -- ASCII String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 40 --** -- ASCII String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 50 --** -- ASCII String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) **-- Offset is: 60 --** -- ASCII String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) --Multibyte String -- -Warning: mb_strpos(): Offset not contained in string. in %s on line %d +Warning: mb_strpos(): Offset not contained in string in %s on line %d bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt diff -u php-src/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt:1.2 php-src/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt:1.3 --- php-src/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt:1.2 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt Sun Feb 15 07:04:07 2009 @@ -114,18 +114,28 @@ int(8) -- Iteration 3 -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 4 -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 5 -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 6 -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 7 -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 8 -- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt diff -u php-src/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt:1.2 php-src/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt:1.3 --- php-src/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt:1.2 Fri Dec 5 13:13:15 2008 +++ php-src/ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt Sun Feb 15 07:04:07 2009 @@ -50,9 +50,9 @@ **-- Offset is: -10 --** -- ASCII String -- -bool(false) +int(9) --Multibyte String -- -bool(false) +int(9) **-- Offset is: 0 --** -- ASCII String -- @@ -74,26 +74,42 @@ **-- Offset is: 30 --** -- ASCII String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: 40 --** -- ASCII String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: 50 --** -- ASCII String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: 60 --** -- ASCII String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strrpos_variation3.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mbstring/tests/mb_strrpos_variation3.phpt diff -u php-src/ext/mbstring/tests/mb_strrpos_variation3.phpt:1.4 php-src/ext/mbstring/tests/mb_strrpos_variation3.phpt:1.5 --- php-src/ext/mbstring/tests/mb_strrpos_variation3.phpt:1.4 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_strrpos_variation3.phpt Sun Feb 15 07:04:07 2009 @@ -96,9 +96,13 @@ int(8) -- Iteration 3 -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 4 -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 5 -- @@ -108,6 +112,8 @@ bool(false) -- Iteration 7 -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) -- Iteration 8 -- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strrpos_variation5.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/mbstring/tests/mb_strrpos_variation5.phpt diff -u php-src/ext/mbstring/tests/mb_strrpos_variation5.phpt:1.3 php-src/ext/mbstring/tests/mb_strrpos_variation5.phpt:1.4 --- php-src/ext/mbstring/tests/mb_strrpos_variation5.phpt:1.3 Tue May 27 18:16:04 2008 +++ php-src/ext/mbstring/tests/mb_strrpos_variation5.phpt Sun Feb 15 07:04:07 2009 @@ -38,31 +38,47 @@ echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing mb_strrpos() : usage variations *** **-- Offset is: -60 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: -50 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: -40 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: -30 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: -20 --** @@ -97,25 +113,41 @@ **-- Offset is: 30 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: 40 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: 50 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) **-- Offset is: 60 --** -- ASCII String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) --Multibyte String -- + +Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_strstr_variation2.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/mbstring/tests/mb_strstr_variation2.phpt diff -u php-src/ext/mbstring/tests/mb_strstr_variation2.phpt:1.2 php-src/ext/mbstring/tests/mb_strstr_variation2.phpt:1.3 --- php-src/ext/mbstring/tests/mb_strstr_variation2.phpt:1.2 Fri Dec 5 13:13:15 2008 +++ php-src/ext/mbstring/tests/mb_strstr_variation2.phpt Sun Feb 15 07:04:07 2009 @@ -165,38 +165,38 @@ bool(false) --uppercase NULL-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --lowercase null-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --lowercase true-- bool(false) --lowercase false-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --uppercase TRUE-- bool(false) --uppercase FALSE-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --empty string DQ-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --empty string SQ-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --instance of classWithToString-- Error: 4096 - Method classWithToString::__toString() must return a string value, %s(%d) -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --instance of classWithoutToString-- @@ -204,11 +204,11 @@ bool(false) --undefined var-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --unset var-- -Error: 2 - mb_strstr(): Empty delimiter., %s(%d) +Error: 2 - mb_strstr(): Empty delimiter, %s(%d) bool(false) --resource-- http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_substr_count_variation2.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/mbstring/tests/mb_substr_count_variation2.phpt diff -u php-src/ext/mbstring/tests/mb_substr_count_variation2.phpt:1.4 php-src/ext/mbstring/tests/mb_substr_count_variation2.phpt:1.5 --- php-src/ext/mbstring/tests/mb_substr_count_variation2.phpt:1.4 Fri Dec 5 13:13:14 2008 +++ php-src/ext/mbstring/tests/mb_substr_count_variation2.phpt Sun Feb 15 07:04:07 2009 @@ -133,12 +133,12 @@ -- Iteration 10 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 11 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 12 -- @@ -146,7 +146,7 @@ -- Iteration 13 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 14 -- @@ -154,17 +154,17 @@ -- Iteration 15 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 16 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 17 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 18 -- @@ -181,16 +181,16 @@ -- Iteration 22 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 23 -- -Warning: mb_substr_count(): Empty substring. in %s on line %d +Warning: mb_substr_count(): Empty substring in %s on line %d bool(false) -- Iteration 24 -- Warning: mb_substr_count() expects parameter 2 to be binary string, resource given in %s on line %d NULL -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