diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-12-27 13:26:06 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-12-27 13:26:06 +0300 |
commit | a6fcbb7c8709d20a471d81839e320693f7636a34 (patch) | |
tree | 0d0918b6ba1ae2b12b92db8fcca19453af7ecf90 /Zend/zend_execute_API.c | |
parent | 856ad54f4504e1659797f84f8b951e6f80918da3 (diff) | |
download | php-git-a6fcbb7c8709d20a471d81839e320693f7636a34.tar.gz |
Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double check
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 8e366ca75c..f2f9b55009 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -866,7 +866,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) / ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *key, int use_autoload) /* {{{ */ { zend_class_entry *ce = NULL; - zval args[1]; + zval args[1], *zv; zval local_retval; zend_string *lc_name; zend_fcall_info fcall_info; @@ -887,12 +887,12 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k } } - ce = zend_hash_find_ptr(EG(class_table), lc_name); - if (ce) { + zv = zend_hash_find(EG(class_table), lc_name); + if (zv) { if (!key) { zend_string_release(lc_name); } - return ce; + return (zend_class_entry*)Z_PTR_P(zv); } /* The compiler is not-reentrant. Make sure we __autoload() only during run-time |