dmitry          Tue Jan 18 05:33:51 2005 EDT

  Added files:                 (Branch: PHP_5_0)
    /php-src/ext/standard/tests/general_functions       bug31190.phpt 

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/standard       basic_functions.c 
  Log:
  Fixed bug #31190 (iexceptions in call_user_func_array())
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.190&r2=1.1760.2.191&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.190 php-src/NEWS:1.1760.2.191
--- php-src/NEWS:1.1760.2.190   Tue Jan 18 04:04:41 2005
+++ php-src/NEWS        Tue Jan 18 05:33:49 2005
@@ -12,6 +12,8 @@
 - Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani)
 - Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia)
 - Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob)
+- Fixed bug #31190 (call_user_func_array(), exceptions, and the patch).
+  (phpbugs at domain51 dot net, Dmitry)
 - Fixed bug #31142 (imap_mail_compose() fails to generate correct output). 
(Ilia)
 - Fixed bug #31139 (XML Parser Functions seem to drop & when parsing). 
(Rob)
 - Fixed bug #31111 (Compile failure of zend_strtod.c). (Derick)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.673.2.11&r2=1.673.2.12&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.673.2.11 
php-src/ext/standard/basic_functions.c:1.673.2.12
--- php-src/ext/standard/basic_functions.c:1.673.2.11   Sun Jan  9 11:30:15 2005
+++ php-src/ext/standard/basic_functions.c      Tue Jan 18 05:33:50 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.673.2.11 2005/01/09 16:30:15 sniper Exp $ */
+/* $Id: basic_functions.c,v 1.673.2.12 2005/01/18 10:33:50 dmitry Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1993,8 +1993,10 @@
                current++;
        }
 
-       if (call_user_function_ex(EG(function_table), NULL, *func, &retval_ptr, 
count, func_params, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) {
-               COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+       if (call_user_function_ex(EG(function_table), NULL, *func, &retval_ptr, 
count, func_params, 0, NULL TSRMLS_CC) == SUCCESS) {
+               if (retval_ptr) {
+                       COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+               }
        } else {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call 
%s()", name);
        }

http://cvs.php.net/co.php/php-src/ext/standard/tests/general_functions/bug31190.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/general_functions/bug31190.phpt
+++ php-src/ext/standard/tests/general_functions/bug31190.phpt

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

Reply via email to