From: Antony Dovgal Date: Thu, 10 Jan 2008 14:31:11 +0000 (+0000) Subject: fix #43750 (stristr() modifies string) X-Git-Tag: RELEASE_2_0_0a1~959 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=335728651fa18fc4b7d4c5162065962f80278241;p=php fix #43750 (stristr() modifies string) patch by Felipe Pena --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 3c30acc49c..a06db61283 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2526,6 +2526,9 @@ PHP_FUNCTION(stristr) 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); }