summaryrefslogtreecommitdiff
path: root/ext/spl/php_spl.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2008-08-14 10:24:52 +0000
committerMarcus Boerger <helly@php.net>2008-08-14 10:24:52 +0000
commit32f9d0e180af2d809bf70e40850fc75e6d663945 (patch)
treed5ad09ae92ff108bf761c268b543dc2a0235e4b2 /ext/spl/php_spl.c
parent261b4d0965bf0011c677c2ed431de77719a9cb46 (diff)
downloadphp-git-32f9d0e180af2d809bf70e40850fc75e6d663945.tar.gz
- MFH Improve exception linking
Diffstat (limited to 'ext/spl/php_spl.c')
-rwxr-xr-xext/spl/php_spl.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index 522cda68f5..22a264bde7 100755
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -381,7 +381,6 @@ PHP_FUNCTION(spl_autoload_call)
if (SPL_G(autoload_functions)) {
int l_autoload_running = SPL_G(autoload_running);
- zval *exception = NULL;
SPL_G(autoload_running) = 1;
class_name_len = Z_STRLEN_P(class_name);
lc_name = zend_str_tolower_dup(Z_STRVAL_P(class_name), class_name_len);
@@ -390,12 +389,7 @@ PHP_FUNCTION(spl_autoload_call)
zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &func_name_len, &dummy, 0, &function_pos);
zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) &alfi, &function_pos);
zend_call_method(alfi->obj ? &alfi->obj : NULL, alfi->ce, &alfi->func_ptr, func_name, func_name_len, &retval, 1, class_name, NULL TSRMLS_CC);
- zend_exception_set_previous(exception TSRMLS_CC);
- if (EG(exception)) {
- zend_exception_set_previous(exception TSRMLS_CC);
- exception = EG(exception);
- EG(exception) = NULL;
- }
+ zend_exception_save(TSRMLS_C);
if (retval) {
zval_ptr_dtor(&retval);
}
@@ -404,7 +398,7 @@ PHP_FUNCTION(spl_autoload_call)
}
zend_hash_move_forward_ex(SPL_G(autoload_functions), &function_pos);
}
- EG(exception) = exception;
+ zend_exception_restore(TSRMLS_C);
efree(lc_name);
SPL_G(autoload_running) = l_autoload_running;
} else {