From: Hannes Magnusson Date: Mon, 12 Sep 2011 11:44:55 +0000 (+0000) Subject: Ensure we are working with strings here X-Git-Tag: php-5.4.0beta1~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee27f57095cc337aed2c066960ec38087cb5ddae;p=php Ensure we are working with strings here --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 41fdb32a7b..4deb58cb3e 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -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;