ID: 43750 Updated by: [EMAIL PROTECTED] Reported By: samuel at slbdata dot se -Status: Open +Status: Closed -Bug Type: Scripting Engine problem +Bug Type: Strings related Operating System: Ubuntu 7.10 PHP Version: 6CVS-2008-01-04 (snap) New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-01-08 14:25:43] samuel at slbdata dot se It works correctly with your patch. Thank you! ------------------------------------------------------------------------ [2008-01-08 11:37:54] [EMAIL PROTECTED] Index: string.c =================================================================== RCS file: /repository/php-src/ext/standard/string.c,v retrieving revision 1.659 diff -u -u -r1.659 string.c --- string.c 31 Dec 2007 07:12:16 -0000 1.659 +++ string.c 8 Jan 2008 11:33:56 -0000 @@ -2526,6 +2526,9 @@ return; } + SEPARATE_ZVAL(haystack); + SEPARATE_ZVAL(needle); + if (Z_TYPE_PP(haystack) != IS_UNICODE && Z_TYPE_PP(haystack) != IS_STRING) { convert_to_text_ex(haystack); } ------------------------------------------------------------------------ [2008-01-04 16:12:35] samuel at slbdata dot se Description: ------------ stristr converts it's parameters to lower case (non-ASCII characters are not changed though). This happens with php6.0-200801022130 and php6.0-200801041530 and the locale set to sv_SE.UTF-8 This might be a regression of bug #3890 Reproduce code: --------------- <?php $a = "ABCÅÄÖ"; $b = "PHP"; stristr($a, $b); echo "$a\n$b\n"; Expected result: ---------------- ABCÅÄÖ PHP Actual result: -------------- abcÅÄÖ php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43750&edit=1