]> granicus.if.org Git - php/commitdiff
Fix exceptions happening inside internal functions called through
authorZeev Suraski <zeev@php.net>
Wed, 4 Feb 2004 23:48:39 +0000 (23:48 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 4 Feb 2004 23:48:39 +0000 (23:48 +0000)
zend_user_function()

Zend/zend_execute_API.c

index fb2b2b7082cc6cf341b1f33b4e598730e602e4ff..09cd8dc5b4af99d859c2594bd75111a3441895d2 100644 (file)
@@ -547,12 +547,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
        }
 
        /* Initialize execute_data */
-       EX(fbc) = NULL;
-       EX(object) = NULL;
-       EX(Ts) = NULL;
-       EX(op_array) = NULL;
-       EX(opline) = NULL;
-       *fci->retval_ptr_ptr = NULL;
+       if (EG(current_execute_data)) {
+               execute_data = *EG(current_execute_data);
+       } else {
+               memset(&execute_data, 0, sizeof(zend_execute_data));
+       }
 
        if (!fci_cache || !fci_cache->initialized) {
                if (fci->function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */