(Ilia)
- Fixed bug #26680 (Added version check in mysqli_report_index) (Georg)
- Fixed bug #26675 (Segfault on ArrayAccess use). (Marcus)
+- Fixed bug #25038 (call_user_func issues warning if function throws
+ exception). (Marcus)
21 Dec 2003, PHP 5 Beta 3
- Bundled new tidy extension (John, Wez)
RETURN_NULL();
}
- if (call_user_function_ex(EG(function_table), NULL, *params[0], &retval_ptr, argc-1, params+1, 0, NULL TSRMLS_CC) == SUCCESS && retval_ptr) {
- COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+ if (call_user_function_ex(EG(function_table), NULL, *params[0], &retval_ptr, argc-1, params+1, 0, NULL TSRMLS_CC) == SUCCESS) {
+ if (retval_ptr) {
+ COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+ }
} else {
if (argc > 1) {
SEPARATE_ZVAL(params[1]);
--- /dev/null
+--TEST--
+Bug #25038 (call_user_func issues warning if function throws exception)
+--FILE--
+<?php
+
+function bar($x='no argument')
+{
+ throw new Exception("This is an exception from bar({$x}).");
+}
+try
+{
+ bar('first try');
+}
+catch (Exception $e)
+{
+ print $e->getMessage()."\n";
+}
+try
+{
+ call_user_func('bar','second try');
+}
+catch (Exception $e)
+{
+ print $e->getMessage()."\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+This is an exception from bar(first try).
+This is an exception from bar(second try).
+===DONE===