tony2001                Wed Mar 14 23:47:44 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/pcre   php_pcre.c 
    /php-src/ext/pcre/tests     preg_replace_callback2.phpt 
  Log:
  MFH: remove unnecessary warning in case of exception
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.15&r2=1.168.2.9.2.16&diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.15 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.16
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.15  Wed Jan 10 14:37:31 2007
+++ php-src/ext/pcre/php_pcre.c Wed Mar 14 23:47:44 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.15 2007/01/10 14:37:31 bjori Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.16 2007/03/14 23:47:44 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -811,7 +811,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.1.2.2&r2=1.1.2.3&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.1.2.2 
php-src/ext/pcre/tests/preg_replace_callback2.phpt:1.1.2.3
--- php-src/ext/pcre/tests/preg_replace_callback2.phpt:1.1.2.2  Mon Jul  3 
16:03:51 2006
+++ php-src/ext/pcre/tests/preg_replace_callback2.phpt  Wed Mar 14 23:47:44 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"

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to