summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index fdffed34b2..cf92d4807c 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -130,7 +130,7 @@ void init_executor(void) /* {{{ */
zend_init_fpu();
ZVAL_NULL(&EG(uninitialized_zval));
- ZVAL_NULL(&EG(error_zval));
+ ZVAL_ERROR(&EG(error_zval));
/* destroys stack frame, therefore makes core dumps worthless */
#if 0&&ZEND_DEBUG
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
@@ -397,6 +397,12 @@ void shutdown_executor(void) /* {{{ */
zend_shutdown_fpu();
+#ifdef ZEND_DEBUG
+ if (EG(ht_iterators_used)) {
+ zend_error(E_WARNING, "Leaked %" PRIu32 " hashtable iterators", EG(ht_iterators_used));
+ }
+#endif
+
EG(ht_iterators_used) = 0;
if (EG(ht_iterators) != EG(ht_iterators_slots)) {
efree(EG(ht_iterators));
@@ -937,7 +943,6 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
zend_class_entry *ce = NULL;
zval args[1];
zval local_retval;
- int retval;
zend_string *lc_name;
zend_fcall_info fcall_info;
zend_fcall_info_cache fcall_cache;
@@ -1033,7 +1038,9 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
fcall_cache.object = NULL;
zend_exception_save();
- retval = zend_call_function(&fcall_info, &fcall_cache);
+ if ((zend_call_function(&fcall_info, &fcall_cache) == SUCCESS) && !EG(exception)) {
+ ce = zend_hash_find_ptr(EG(class_table), lc_name);
+ }
zend_exception_restore();
zval_ptr_dtor(&args[0]);
@@ -1043,9 +1050,6 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
zval_ptr_dtor(&local_retval);
- if (retval == SUCCESS) {
- ce = zend_hash_find_ptr(EG(class_table), lc_name);
- }
if (!key) {
zend_string_release(lc_name);
}