summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-02-13 23:04:49 +0000
committerMarcus Boerger <helly@php.net>2005-02-13 23:04:49 +0000
commita57b6bad69208f9bbbebd6977d75a911f925b1ac (patch)
tree196da75545455bd0d4ed823d7e8e966c88caf7f9 /Zend/zend_execute_API.c
parenta92ae61cb8324aae67994269ccad4961b3dd9d04 (diff)
downloadphp-git-a57b6bad69208f9bbbebd6977d75a911f925b1ac.tar.gz
- Be more gracious in reflection API
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 85919fde93..305d20dc17 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -952,15 +952,15 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
return FAILURE;
}
- if (EG(exception)) {
+ if (EG(exception) && exception) {
free_alloca(lc_name);
zend_error(E_ERROR, "Function %s(%s) threw an exception of type '%s'", ZEND_AUTOLOAD_FUNC_NAME, 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);
+ if (!EG(exception)) {
+ EG(exception) = exception;
+ zval_ptr_dtor(&retval_ptr);
+ }
retval = zend_hash_find(EG(class_table), lc_name, name_length + 1, (void **) ce);
free_alloca(lc_name);