cvs: php-src /ext/pcre php_pcre.c /ext/pcre/tests preg_replace_callback2.phpt

From: Date: Wed, 14 Mar 2007 23:47:19 +0000
Subject: cvs: php-src /ext/pcre php_pcre.c /ext/pcre/tests preg_replace_callback2.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43546@lists.php.net to get a copy of this message
tony2001 Wed Mar 14 23:47:19 2007 UTC Modified files: /php-src/ext/pcre php_pcre.c /php-src/ext/pcre/tests preg_replace_callback2.phpt Log: don't emit any warnings in addition to an exception http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.210&r2=1.211&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.210 php-src/ext/pcre/php_pcre.c:1.211 --- php-src/ext/pcre/php_pcre.c:1.210 Mon Jan 1 09:29:27 2007 +++ php-src/ext/pcre/php_pcre.c Wed Mar 14 23:47:19 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.210 2007/01/01 09:29:27 sebastian Exp $ */ +/* $Id: php_pcre.c,v 1.211 2007/03/14 23:47:19 tony2001 Exp $ */ /* TODO * php_pcre_replace_impl(): @@ -912,7 +912,9 @@ 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); } http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/preg_replace_callback2.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/pcre/tests/preg_replace_callback2.phpt diff -u php-src/ext/pcre/tests/preg_replace_callback2.phpt:1.5 php-src/ext/pcre/tests/preg_replace_callback2.phpt:1.6 --- php-src/ext/pcre/tests/preg_replace_callback2.phpt:1.5 Tue Sep 19 11:49:21 2006 +++ php-src/ext/pcre/tests/preg_replace_callback2.phpt Wed Mar 14 23:47:19 2007 @@ -22,7 +22,6 @@ var_dump(preg_replace_callback('~\A.~', create_function('$m', 'return strtolower($m[0]);'), 'ABC')); ?> --EXPECTF-- -Warning: preg_replace_callback(): Unable to call custom replacement function in %spreg_replace_callback2.php on line %d array(3) { [0]=> string(12) "'a' 'b3' bcd" @@ -39,7 +38,6 @@ } string(3) "aBC" --UEXPECTF-- -Warning: preg_replace_callback(): Unable to call custom replacement function in %s on line %d array(3) { [0]=> unicode(12) "'a' 'b3' bcd"

« previous php.cvs (#43546) next »