summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-03-14 23:47:44 +0000
committerAntony Dovgal <tony2001@php.net>2007-03-14 23:47:44 +0000
commitf6536ed2b23f3c5384ba9d89fa1ef5c48c6c129d (patch)
treef8d1cf41181930d1839835f983d11e2187e38ea2 /ext/pcre/php_pcre.c
parent7aab16c333c25efccafd953e89e767e009e527e4 (diff)
downloadphp-git-f6536ed2b23f3c5384ba9d89fa1ef5c48c6c129d.tar.gz
MFH: remove unnecessary warning in case of exception
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index bd1383b43a..c11fd4fda0 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -811,7 +811,9 @@ static int preg_do_repl_func(zval *function, char *subject, int *offsets, int co
result_len = Z_STRLEN_P(retval_ptr);
zval_ptr_dtor(&retval_ptr);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call custom replacement function");
+ if (!EG(exception)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call custom replacement function");
+ }
result_len = offsets[1] - offsets[0];
*result = estrndup(&subject[offsets[0]], result_len);
}