summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2002-09-02 12:26:09 +0000
committerThies C. Arntzen <thies@php.net>2002-09-02 12:26:09 +0000
commit96ab23981ccb6bb84fe9daeac143768a7a502f2f (patch)
tree0c415051648d662e17dbde7e048f84fa926b8b8f /Zend
parent9afea7175c78fea9a6bd26f03ad0ddd0463c77ee (diff)
downloadphp-git-96ab23981ccb6bb84fe9daeac143768a7a502f2f.tar.gz
refine last patch. if the argument-stack is not consistent don't try to show
arguments. no call to zend_error is made as we might end up in an infinite recursion if called from an error_handler. so: if the arguments to functions aren't shown in debug_backtrace this is 'cause the arument stack was not consistent when debug_backtrace was called.
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_builtin_functions.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index b507d8dea7..2918dc068b 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1299,10 +1299,6 @@ ZEND_FUNCTION(debug_backtrace)
}
}
- if (! arg_stack_consitent) {
- zend_error(E_ERROR, "debug_backtrace(): Can't be called by function parameter");
- }
-
ptr = EG(current_execute_data);
/* skip debug_backtrace() */
@@ -1350,7 +1346,9 @@ ZEND_FUNCTION(debug_backtrace)
}
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));
+ if (arg_stack_consitent) {
+ add_assoc_zval_ex(stack_frame, "args", sizeof("args"), debug_backtrace_get_args(&cur_arg_pos TSRMLS_CC));
+ }
}
} else {
/* i know this is kinda ugly, but i'm trying to avoid extra cycles in the main execution loop */