diff options
| author | Xinchen Hui <laruence@php.net> | 2012-08-04 11:14:03 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2012-08-04 11:14:03 +0800 |
| commit | d289efb45771217a826f10def835a6185683a1eb (patch) | |
| tree | a81588d50643a05c936a3a3882c05d5fe9c6849f /Zend/zend_API.c | |
| parent | d1f0662e4d587754742891f0a179551d8f36674f (diff) | |
| parent | 03a1fcabf31210d3f304bfacf5096ce43c2b8f93 (diff) | |
| download | php-git-d289efb45771217a826f10def835a6185683a1eb.tar.gz | |
Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
Zend/zend_API.h
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 98a33e5445..827446b26d 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2547,16 +2547,15 @@ static const zend_function_entry disabled_class_new[] = { ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_DC) /* {{{ */ { - zend_class_entry disabled_class; + zend_class_entry **disabled_class; zend_str_tolower(class_name, class_name_length); - if (zend_hash_del(CG(class_table), class_name, class_name_length+1)==FAILURE) { + if (zend_hash_find(CG(class_table), class_name, class_name_length+1, (void **)&disabled_class)==FAILURE) { return FAILURE; } - INIT_OVERLOADED_CLASS_ENTRY_EX(disabled_class, class_name, class_name_length, disabled_class_new, NULL, NULL, NULL, NULL, NULL); - disabled_class.create_object = display_disabled_class; - disabled_class.name_length = class_name_length; - zend_register_internal_class(&disabled_class TSRMLS_CC); + INIT_CLASS_ENTRY_INIT_METHODS((**disabled_class), disabled_class_new, NULL, NULL, NULL, NULL, NULL); + (*disabled_class)->create_object = display_disabled_class; + zend_hash_clean(&((*disabled_class)->function_table)); return SUCCESS; } /* }}} */ @@ -2630,7 +2629,6 @@ static int zend_is_callable_check_class(const char *name, int name_len, zend_fca } /* }}} */ - static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fcall_info_cache *fcc, int strict_class, char **error TSRMLS_DC) /* {{{ */ { zend_class_entry *ce_org = fcc->calling_scope; |
