cvs: ZendEngine2 / zend_builtin_functions.c zend_execute_API.c
| From: | Thies C. Arntzen | Date: | Wed, 28 Aug 2002 15:05:15 +0000 |
| Subject: | cvs: ZendEngine2 / zend_builtin_functions.c zend_execute_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-370@lists.php.net to get a copy of this message | ||
thies Wed Aug 28 11:05:15 2002 EDT
Modified files:
/ZendEngine2 zend_builtin_functions.c zend_execute_API.c
Log:
debug_backtrace()
- make args passed to functions called vy call_user_function available again.
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.140 ZendEngine2/zend_builtin_functions.c:1.141
--- ZendEngine2/zend_builtin_functions.c:1.140 Wed Aug 28 10:49:15 2002
+++ ZendEngine2/zend_builtin_functions.c Wed Aug 28 11:05:15 2002
@@ -1280,8 +1280,6 @@
char *include_filename = NULL;
zval *stack_frame;
void **cur_arg_pos = EG(argument_stack).top_element;
- int get_args;
-
if (ZEND_NUM_ARGS()) {
WRONG_PARAM_COUNT;
@@ -1312,11 +1310,6 @@
/* try to fetch args only if an FCALL was just made - elsewise we're in the middle of a
function
* and debug_baktrace() might have been called by the error_handler. in this case we don't
* want to pop anything of the argument-stack */
- if ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) || (ptr->opline->opcode ==
ZEND_DO_FCALL)) {
- get_args = 1;
- } else {
- get_args = 0;
- }
} else {
filename = NULL;
}
@@ -1342,7 +1335,7 @@
add_assoc_string_ex(stack_frame, "type", sizeof("type"), call_type, 1);
}
- if (get_args) {
+ if ((! ptr->opline) || ((ptr->opline->opcode == ZEND_DO_FCALL_BY_NAME) ||
(ptr->opline->opcode == ZEND_DO_FCALL))) {
add_assoc_zval_ex(stack_frame, "args", sizeof("args"),
debug_backtrace_get_args(&cur_arg_pos TSRMLS_CC));
}
} else {
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.171 ZendEngine2/zend_execute_API.c:1.172
--- ZendEngine2/zend_execute_API.c:1.171 Fri Aug 23 09:50:42 2002
+++ ZendEngine2/zend_execute_API.c Wed Aug 28 11:05:15 2002
@@ -477,6 +477,7 @@
EX(object) = NULL;
EX(Ts) = NULL;
EX(op_array) = NULL;
+ EX(opline) = NULL;
*retval_ptr_ptr = NULL;
if (function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */