- 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)
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);
}
--- /dev/null
+--TEST--
+bug #31190 (exception in call_user_func_array())
+--FILE--
+<?php
+
+class test {
+ function throwException() { throw new Exception("Hello World!\n");
+} }
+
+$array = array(new test(), 'throwException');
+try {
+ call_user_func($array, 1, 2);
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+
+try {
+ call_user_func_array($array, array(1, 2));
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECT--
+Hello World!
+Hello World!
+