cvs: php4 /ext/pcre php_pcre.c

From: Date: Mon, 22 Jan 2001 22:05:05 +0000
Subject: cvs: php4 /ext/pcre php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3737@lists.php.net to get a copy of this message
andrei Mon Jan 22 14:05:05 2001 EDT Modified files: /php4/ext/pcre php_pcre.c Log: If we can't call custom replacement function, don't change the subject string. Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.80 php4/ext/pcre/php_pcre.c:1.81 --- php4/ext/pcre/php_pcre.c:1.80 Mon Jan 22 11:42:29 2001 +++ php4/ext/pcre/php_pcre.c Mon Jan 22 14:05:04 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.80 2001/01/22 19:42:29 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.81 2001/01/22 22:05:04 andrei Exp $ */ /* TODO: @@ -587,8 +587,8 @@ zval_ptr_dtor(&retval_ptr); } else { php_error(E_WARNING, "Unable to call custom replacement function %s()", function_name); - *result = empty_string; - result_len = 0; + result_len = offsets[1] - offsets[0]; + *result = estrndup(&subject[offsets[0]], result_len); } zval_dtor(subpats); FREE_ZVAL(subpats);

« previous php.cvs (#3737) next »