Index: Zend/zend.c =================================================================== RCS file: /repository/ZendEngine2/zend.c,v retrieving revision 1.308.2.12.2.17 diff -u -p -d -r1.308.2.12.2.17 zend.c --- Zend/zend.c 19 Aug 2006 16:20:08 -0000 1.308.2.12.2.17 +++ Zend/zend.c 11 Sep 2006 13:17:03 -0000 @@ -503,6 +503,7 @@ static void executor_globals_ctor(zend_e EG(current_execute_data) = NULL; EG(current_module) = NULL; EG(exit_status) = 0; + EG(active) = 0; } Index: Zend/zend_execute_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_execute_API.c,v retrieving revision 1.331.2.20.2.5 diff -u -p -d -r1.331.2.20.2.5 zend_execute_API.c --- Zend/zend_execute_API.c 12 Jul 2006 07:54:00 -0000 1.331.2.20.2.5 +++ Zend/zend_execute_API.c 11 Sep 2006 13:17:04 -0000 @@ -188,6 +188,8 @@ void init_executor(TSRMLS_D) EG(scope) = NULL; EG(This) = NULL; + + EG(active) = 1; } static int zval_call_destructor(zval **zv TSRMLS_DC) @@ -316,6 +318,7 @@ void shutdown_executor(TSRMLS_D) FREE_HASHTABLE(EG(in_autoload)); } } zend_end_try(); + EG(active) = 0; } @@ -580,6 +583,10 @@ int call_user_function_ex(HashTable *fun { zend_fcall_info fci; + if (!EG(active)) { + return FAILURE; + } + fci.size = sizeof(fci); fci.function_table = function_table; fci.object_pp = object_pp; Index: Zend/zend_globals.h =================================================================== RCS file: /repository/ZendEngine2/zend_globals.h,v retrieving revision 1.141.2.3.2.5 diff -u -p -d -r1.141.2.3.2.5 zend_globals.h --- Zend/zend_globals.h 18 Jul 2006 09:06:33 -0000 1.141.2.3.2.5 +++ Zend/zend_globals.h 11 Sep 2006 13:17:04 -0000 @@ -237,6 +237,8 @@ struct _zend_executor_globals { zend_property_info std_property_info; + zend_bool active; + void *reserved[ZEND_MAX_RESERVED_RESOURCES]; };