]> granicus.if.org Git - php/commitdiff
Ensure we are working with strings here
authorHannes Magnusson <bjori@php.net>
Mon, 12 Sep 2011 11:44:55 +0000 (11:44 +0000)
committerHannes Magnusson <bjori@php.net>
Mon, 12 Sep 2011 11:44:55 +0000 (11:44 +0000)
ext/pcre/php_pcre.c

index 9311fc13f3edf788929ca49294863220ca1e0429..79c8f2d48cb94149f94973b12355d7b1c2831f52 100644 (file)
@@ -1013,6 +1013,7 @@ PHPAPI char *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject, int sub
                        return NULL;
                }
        } else {
+               convert_to_string_ex(&replace_val);
                replace = Z_STRVAL_P(replace_val);
                replace_len = Z_STRLEN_P(replace_val);
                replace_end = replace + replace_len;