|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-01-04 16:12 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
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); }