cvs: ZendEngine2 / zend_builtin_functions.c

From: Date: Mon, 02 Sep 2002 12:26:09 +0000
Subject: cvs: ZendEngine2 / zend_builtin_functions.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-382@lists.php.net to get a copy of this message
thies Mon Sep 2 08:26:09 2002 EDT Modified files: /ZendEngine2 zend_builtin_functions.c Log: 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. Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.142 ZendEngine2/zend_builtin_functions.c:1.143 --- ZendEngine2/zend_builtin_functions.c:1.142 Mon Sep 2 08:20:09 2002 +++ ZendEngine2/zend_builtin_functions.c Mon Sep 2 08:26:09 2002 @@ -1299,10 +1299,6 @@ } } - 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 @@ } 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 */

« previous php.zend-engine.cvs (#382) next »