diff options
author | Thies C. Arntzen <thies@php.net> | 2002-08-28 15:05:15 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 2002-08-28 15:05:15 +0000 |
commit | eef3e66f1f3e0803022aa34e67a0279314cb8bd6 (patch) | |
tree | bc9f86de56c36f37c9df389ca5bef2214db8afbd /Zend/zend_builtin_functions.c | |
parent | 7f62a0c972bb7de6cf280c9829686d58d2b68233 (diff) | |
download | php-git-eef3e66f1f3e0803022aa34e67a0279314cb8bd6.tar.gz |
debug_backtrace()
- make args passed to functions called vy call_user_function available again.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index b3be63433c..95ba4efbf1 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1280,8 +1280,6 @@ ZEND_FUNCTION(debug_backtrace) 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 @@ ZEND_FUNCTION(debug_backtrace) /* 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 @@ ZEND_FUNCTION(debug_backtrace) 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 { |