]> granicus.if.org Git - php/commitdiff
fix #43750 (stristr() modifies string)
authorAntony Dovgal <tony2001@php.net>
Thu, 10 Jan 2008 14:31:11 +0000 (14:31 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 10 Jan 2008 14:31:11 +0000 (14:31 +0000)
patch by Felipe Pena

ext/standard/string.c

index 3c30acc49c73a31409dfb3b3138869ea25f2d5e5..a06db61283dbaea38c05f847631a46061537f7de 100644 (file)
@@ -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);
        }