#43750 [Opn]: stristr modifies strings

2008-01-08 Thread samuel at slbdata dot se
 ID:   43750
 User updated by:  samuel at slbdata dot se
 Reported By:  samuel at slbdata dot se
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu 7.10
 PHP Version:  6CVS-2008-01-04 (snap)
 New Comment:

It works correctly with your patch.

Thank you!


Previous Comments:


[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.c31 Dec 2007 07:12:16 -  1.659
+++ string.c8 Jan 2008 11:33:56 -
@@ -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:
---
http://bugs.php.net/?id=43750&edit=1


#43750 [Opn]: stristr modifies strings

2008-01-08 Thread felipe
 ID:   43750
 Updated by:   [EMAIL PROTECTED]
 Reported By:  samuel at slbdata dot se
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu 7.10
 PHP Version:  6CVS-2008-01-04 (snap)
 New Comment:

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.c31 Dec 2007 07:12:16 -  1.659
+++ string.c8 Jan 2008 11:33:56 -
@@ -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);
}



Previous Comments:


[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:
---
http://bugs.php.net/?id=43750&edit=1