Index: ext/pcre/php_pcre.c =================================================================== RCS file: /repository/php-src/ext/pcre/php_pcre.c,v retrieving revision 1.168.2.9.2.15 diff -u -p -d -r1.168.2.9.2.15 php_pcre.c --- ext/pcre/php_pcre.c 10 Jan 2007 14:37:31 -0000 1.168.2.9.2.15 +++ ext/pcre/php_pcre.c 26 Feb 2007 09:27:12 -0000 @@ -811,7 +811,9 @@ static int preg_do_repl_func(zval *funct 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); }