diff options
author | Marcus Boerger <helly@php.net> | 2003-12-11 18:18:52 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-12-11 18:18:52 +0000 |
commit | 39544e1c7f427e4868524219b1baf558ed42f0fd (patch) | |
tree | 72754dca37bf54177be63d030d690c97eb6ea115 /Zend/zend_execute_API.c | |
parent | 2272c11d8015913e602147978132f6dd75954858 (diff) | |
download | php-git-39544e1c7f427e4868524219b1baf558ed42f0fd.tar.gz |
Bugfix: #26591 [NEW]: "__autoload threw an exception" during an uncaught
Exception
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 77f09ef144..ef75f95c75 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -781,6 +781,7 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry *** zval *retval_ptr; int retval; char *lc_name; + zval *exception; lc_name = do_alloca(name_length + 1); zend_str_tolower_copy(lc_name, name, name_length+1); @@ -797,17 +798,22 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry *** args[0] = &class_name_ptr; + exception = EG(exception); + EG(exception) = NULL; retval = call_user_function_ex(EG(function_table), NULL, &autoload_function, &retval_ptr, 1, args, 0, NULL TSRMLS_CC); if (retval == FAILURE) { + EG(exception) = exception; free_alloca(lc_name); return FAILURE; } if (EG(exception)) { free_alloca(lc_name); - zend_error(E_ERROR, "__autoload threw an exception"); + zend_error(E_ERROR, "__autoload(%s) threw an exception of type '%s'", name, Z_OBJCE_P(EG(exception))->name); + return FAILURE; } + EG(exception) = exception; /* If an exception is thrown retval_ptr will be NULL but we bailout before we reach this point */ zval_ptr_dtor(&retval_ptr); |